Many servers have a very small upload limit and this does not allow to upload images or movies in the original size.
The TFU file split applet is a small Java applet where you can split your files into smaller pieces and store it back on your hard disk. You can then upload these pieces with TFU and they are merged in the backend. If you want your user to get around this limit you can offer them this applet. Please see below how to test if your server does support splited files!You need JDK >= 1.4 installed to use this applet. The applet needs access to your hard disk to read/write the files. This is only possible with a signed applet. If you open the applet you get a warning:
"The application's digital signature is invalid. Do you want to run the application"
This is because this is a selfsigned applet. If you want to verify that this is the original applet that comes from www.TinyWebGallery.com go to the website for instructions how to verify the signature.
I think the usage of this tool is quite self explaining: Select files - select an output directory - select your split size - split!
The input file test.jpg will be splitted e.g. in test.jpg.part1 and test.jpg.part2.
If you use this applet with TFU you should use "part" als split prefix because this is the default setting configured in the flash.
If you upload splitted files you have to upload all splitted files in one upload! Otherwise TFU only merges the ones you have uploaded.
The applet is currently available in German and English and the language is automatically selected by the settings of your system.
If you want to translate the applet to your language: In the fas_signed.jar is a folder resources where a properties file for each language exists. Simply translate it and send this file back to me and i'll create a new signed jar.
automaticSize: This is the size you can set as automatic size in the applet. If you enter 100 the split files size is 100k.
Normally you should set this variable to the upload limit of your server! This can nicely done with php. e.g.:
/* get maximum upload size */
function getMaximumUploadSize()
{
$upload_max = return_kbytes(ini_get('upload_max_filesize'));
$post_max = return_kbytes(ini_get('post_max_size'));
return $upload_max < $post_max ? $upload_max : $post_max;
}
function return_kbytes($val)
{
$val = trim($val);
if (strlen($val) == 0){ return 0; }
$last = strtolower($val{strlen($val)-1});
switch($last){
case 'g': $val *= 1024;
case 'm': $val *= 1024;
case 'k': $val *= 1;
}
return $val;
}
I have tested the TWG Uplad Flash and the TFU File Split Applet on several systems and not all servers do support this kind of upload (e.g. funpic.de does not - my TWG server does). The test is quite simple - you have to upload a file bigger than your file upload limit and TWG has to be able to process it. I have written a small howto with the steps you have to do:
Have fun using TFU File Split Applet
The applet is open source and released under the LGPL. Please go to www.tinywebgallery.com/tfufsa.htm if you want to download the sources or more informations.