Jump to content

Recommended Posts

Posted

Hi all,

Hopefully there's somebody who can help me with an issue while unzipping files.
My goal is to show banners in a portfolio.
In ProcessWire I have created a field, type 'Files', where I can upload the .zip files, one at a time.
I've selected the option Decompress ZIP files, but any subfolder in the .zip somehow disappears.
For example the 'assets' folder is gone after I uploaded the .zip file (see the attachment for the file structure).

I'm curious, is there a way to preserve the file structure inside a .zip file after unzipping it?

 

Kind regards,

Remco

Screen Shot 2018-10-02 at 13.47.58.png

Posted
5 minutes ago, rgaikema said:

Is there any other way to make this work?

What's your use case? Why is this important? If we got a better picture, we can probably suggest an alternative.

Welcome to the forums ?

  • Like 2
Posted

Thank you @kongondo!

My use case is to display a set of banners.
Since the banners themselves are in fact small pages (containing a.html & css file, some images, and a couple of JavaScript files and sometimes web fonts), my approach was to upload a .zip file containing all these files.
I made a template where I point to the uploaded folder to show the banner. I display it as an embedded iframe, for example "assets/843") and that works well, only if all the files are in the root folder of that .zip file.

But sometimes there are subfolders in the .zip file where extra images, or other assets are stored and needed for the banner.
You can imagine I don't want to manual adjust every banner by copying the files in the subfolder to the root and then adjust the .html and css file.
So it would save a lot of time to have the ability to upload .zip files with the file structure intact, including subfolders.

Any help is appreciated ?

 

  • Like 1
  • 4 months later...

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...