Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 9. Nov 2024, 03:57

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Zip on the fly
PostPosted: 29. Nov 2009, 07:50 
Offline

Joined: 4. May 2009, 17:57
Posts: 13
Hi,

Sometimes one of my users want to download an entire folder with pictures as a zip file.

Right now I need to make a zip-filde for every folder in advance to be preparede for the rare occasion when someone want to get the entire folder.

With +14000 pictures it would take up a lot of space.

Is it possible to have TWG generate a zip archive on the fly for the user, when he wants to download the folder he is in?

Cheers,

Abbe


Top
 Profile  
 
 Post subject:
PostPosted: 30. Nov 2009, 10:22 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Hi,

I actually had this before. But the big problem is that the zip file is created in memory. Because you never know how big the zip files will be it's not reliable to count on this solution because sometimes the zip will work and sometimes this will not be the case.
I still have this implementation for TFU - if you select there a couple of files a zip is build on the fly. But I don't know if you want to give your users access to the upload flash.

- Michael


Top
 Profile  
 
 Post subject: Zip files
PostPosted: 30. Nov 2009, 11:11 
Offline

Joined: 4. May 2009, 17:57
Posts: 13
Hi,

Thanks for the quick reply!

I see your point about memory. Is it possible to avoid this by making TWG divide the zip archive into smaller pieces, e.g. if the compressed size of a folder is 200 mb then TWG would generate fx 10 zip files at 20 mb each?

And then present the user for a list of zip files he or she can then download?

One could even have a timeout specified in the config so old TWG-generated zipfiles are deleted automatically after x days. As well as maximum zip-file size and so on.

/Abbe


Top
 Profile  
 
 Post subject: Zip on the fly
PostPosted: 30. Nov 2009, 11:13 
Offline

Joined: 4. May 2009, 17:57
Posts: 13
Oh, I forgot, I dont want to use the TFU for this if I can avoid it.

/Abbe


Top
 Profile  
 
 Post subject:
PostPosted: 30. Nov 2009, 11:26 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I actually just found a class where less memory is used - but this takes a long time to zip and I don't know if users will wait that long. Maybe it would be better to add the functionality to create the zip files in the backend.

- Michael


Top
 Profile  
 
 Post subject: Zip on the fly
PostPosted: 30. Nov 2009, 11:40 
Offline

Joined: 4. May 2009, 17:57
Posts: 13
Hi again,

How much longer would it take? A few minutes would be ok I guess.

That backend functionality sounds very nice indeed, but it would REALLY rock if TWG could make those archives on the fly.

I would like to avoid giving backend acces to those users who would need to get the zip-files.

/Abbe


Top
 Profile  
 
 Post subject:
PostPosted: 30. Nov 2009, 11:46 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
depends on the folder - if you have 50 MB to zip ... 250 MB to zip ...

The task in the backend would not make zips on the fly. You would have to start this task.

- Michael


Top
 Profile  
 
 Post subject: Zip on the fly
PostPosted: 1. Dec 2009, 12:52 
Offline

Joined: 4. May 2009, 17:57
Posts: 13
Hi,

I understand that the backend function would have to be started manually and it would be a cool function for those who don't have direct access to their server: If you need to compress a folder, just make it on the server, no need to ftp a zip file to the server.

What I had in mind though was a line in the top section, perhaps next to "comments" or "info" that said "download as zip" for instance.

Click it and the server compresses the folder you are in to zip, perhaps split into parts, and the user can download the entire folder.

I checked my pictures and most folders are between 100 and 250 mb in size.

My server runs on an Intel e6600 duo core with 2 GB of ram, and 256 recognized by PHP and TWG.

Would it really take that long to make a zip file for fx a 250 mb folder - even with the slow class you mention?

/Abbe


Top
 Profile  
 
 Post subject:
PostPosted: 1. Dec 2009, 13:03 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
point is - I don't know - but there is quite some changes needed to do this. My todo list is like 2 pages long right now - so you would have to do the changes by yourself or I can make you a personal offer for doing this change.

- Michael


Top
 Profile  
 
 Post subject: Zip on the fly
PostPosted: 3. Dec 2009, 11:57 
Offline

Joined: 4. May 2009, 17:57
Posts: 13
Hi,

I would be interested in a offer. Would these changes still be there, next time I upgrade TWG or be overwritten?

Cheers,

Abbe


Top
 Profile  
 
 Post subject:
PostPosted: 3. Dec 2009, 12:09 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Please contact me by e-mail.

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy