Jump to content

Recommended Posts

Posted

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?

Posted (edited)

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
Posted

Similar issue in this thread, I think? 

I had a go at a solution for separately saving the original file name. This is for unzipped files though. If it is of interest, I can upload the module to a gist.

  • Like 3
Posted
10 hours ago, kongondo said:

This is for unzipped files though. If it is of interest, I can upload the module to a gist.

Yes please! I might need such a thing soon, too.

Posted
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
  • 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
×
×
  • Create New...