Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum
https://www.tinywebgallery.com/forum/

Download whole directories (zipfile)
https://www.tinywebgallery.com/forum/viewtopic.php?f=1&t=163
Page 1 of 1

Author:  Michiel [ 6. Feb 2006, 19:00 ]
Post subject:  Download whole directories (zipfile)

I had some trouble to get TWG to download the zipfile I placed in the dir. Solved it, but for others who might have the problem (or for Michael to correct me) I'll post my solution here.

First of: the zipfiles were placed like this:

Code:
../pictures/album/part1/album_part1.zip
../pictures/album/part2/album_part2.zip


The problem was that the generated urls looked like this:
Code:
../pictures/album%2Fpart1/album_part1.zip
../pictures/album%2Fpart2/album_part2.zip


I solved this by making a change in ../i_frames/i_downloadmanager.php

I changed:

Code:
$linkzip =  '../' . $basedir . '/' . rawurlencode($twg_album) . '/' . rawurlencode (str_replace("/", "_", $twg_album)) . '.zip';


to

Code:
$linkzip =  '../' . $basedir . '/' . str_replace("%2F","/",rawurlencode($twg_album)) . '/' . rawurlencode (str_replace("/", "_", $twg_album)) . '.zip';


Hope this helps anyone with similar problems!

Michiel

Author:  TinyWebGallery [ 6. Feb 2006, 23:16 ]
Post subject: 

Hi,

Haven't tried that before :) -
I know hat the / is encoded too and there is a function somewhere that fixes this - but not for the dl of zips ... - I will fix this in the next release ....

/Michael

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/