Jump to content

[SOLVED] No lowercase unzipped files


rgaikema
 Share

Recommended Posts

Hi folks,

I'm trying to make a tool were I can upload zip files in the CMS and on the front you'll see the content in an iframe.
The problem is that when I use the default 'file' field to upload and decompress the content of the zip, all the filenames are set to lowercase.

I want the filenames that are 'zipped' exactly the same as the filenames that are decompressed in PW.
Is there a way to change this?

Link to comment
Share on other sites

Loosely related request in GitHub: https://github.com/processwire/processwire-requests/issues/56. I've also been having a number problems with the current behaviour, but I hope that one day we can get past this whole filename mangling silliness :)

Edit: just realized that you're trying to do pretty much exactly the same thing as I was when I last encountered this issue. If you do find an elegant way around this, please let me know as well :D

Edited by teppo
  • Like 2
Link to comment
Share on other sites

11 hours ago, Robin S said:

Here's an alpha proof-of-concept module if anyone is interested in taking it further:

https://github.com/Toutouwai/FieldtypeFileUnrenamed/

I wonder whether a decent interim solution would be to build this into CustomUploadNames so we don't need a separate fieldtype - that way if the core ever gets support for this, it would simply be a matter of disabling the rule in CustomUploadNames, rather than reverting to the core file fieldtype.

I could add a new option that retains the original filename. Perhaps I could make use of your sanitizer?

Any interest in this approach, or would it just be overcomplicating things?

  • Like 1
Link to comment
Share on other sites

  • rgaikema changed the title to [SOLVED] No lowercase unzipped files

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...