Upload large files to FSG from the web
From OpenFSG
| To meet quality standards, this article may require rewriting and/or reformatting. Please help improve this article. The discussion page may contain suggestions. |
Contents |
Intro
- The FSG has itself an access to FSG Data, but only for downloading data, not for uploading.
- May be you want some Dummy Users to be able to access to the contents of the FSG Data. Sure that those Dummies can not use FTP client.
- May be are somewere where firewall blocks all the ports except port 80. (your work, Public Library...).
- In those cases, it can be a good idea to explore, upload and download files from your FSG via HTTP.
Contents of this HowTo
This HowTo explain 2 things:
- Install a HTML File Manager called QuiXplorer 2.3
- Configure system in order to let this HTML File Manager to manage files larger that 50 MB.
Installing HTML File Manager
- In order to upload files to FSG via http you need to:
Temporary Files Folder
- In my experience the next important step is to create a folder for temporary files.
- In fact, the one used by default by the system is within the system partition and it's limited to approx 50 MB. So for files bigger than 50 MB it won't work.
- I created a folder under /home (e.g. /home/temporary).
Changing php.ini
- It's necessary to change some parameters in php.ini file.
- This file can be found in /usr/local/apache/conf (if you didn't install ipkg; otherwise, it SHOULD be in /home/opt/etc).
- In order to access and modify this file you need to use putty.exe or something equivalent. Instructions can be found in this thread: [3]
- The parameters that need to be changed are:
- upload_tmp_dir
- max_execution_time
- (Maximum execution time of each script, in seconds, originally 30)
- max_input_time
- (Maximum amount of time each script may spend parsing request data, originally 60)
- post_max_size
- (originally 8M)
- upload_max_filesize
- (originally 2M)
upload_tmp_dir
- upload_tmp_diris normally blank in php.ini and the related line is inactive (there is a ";" at the beginning). Remove the ";" and assign to the parameter the path of the newly created temporary files folder
e.g.
upload_tmp_dir = /home/temporary
upload_max_filesize
- The value to give to upload_max_filesize must be at least equal to the dimension of the largest file you want to upload (e.g. 300M)
post_max_size
- post_max_size must be "a little bit bigger" than upload_max_filesize (e.g. 310M).
max_execution_time and max_input_time
- Coming to max_execution_time and max_input_time, I didn't really understand how they work in the FSG environment.
- When I left them like they were (30 and 60 seconds) I didn't manage to transfer more than 160M (and it took me approx 1,5 hours).
- Then I set them to 10800 sec (3 hours) and I had no problem with a 212 MB file (and it took me 4 hours). So, I suggest to do some tentatives.
- With these little modifications I managed to transfer, as I said, a file of 212 MB. I didn't try with bigger files, but I read on the net that no problem should arise even for bigger dimensions. I don't know if there's a physical limit.
P.S. - Limits to maximum upload size could also be within the specific php scripts used to upload. Quixplorer, the script I use, has no limits defined. Other script could have limits and they are generally set in the index.php file or in conf.php file. In this case you have to change these parameters too.
P.P.S. - In order to let parameters changes in php.ini file have effect, restart the FSG.
