TFU File Split Applet

PLEASE go to the next section how to verify that the File Split Applet is the one hat comes from TWG!

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 that your users 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 please read the next section!

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.

Flash upload file split applet verify How to verify that the File Split Applet is the one that comes from TWG!

If you open the page where the applet is included you get the following waring from your browser:

"The application's digital signature is invalid. Do you want to run the application"

You can verify that this applet is the one that comes from this website (the text is language dependant!):

  1. Click on "More information ..."
  2. Click on "Certificate details ..."
  3. Now you can compare the details of the certificate with the one of this page. I will list all versions I will release here. Make sure to compare the right version:

    v0.5:
    Issuer: CN=www.tinywebgallery.com
    Valid: From: Sat Mar 10 14:38:09 CET 2007, To: Mon Mar 09 14:38:09 CET 2009
    Signatur: 30 2C 02 14 53 EE 0E BD 7A C4 38 B8 CB 67 5F 40
    15 73 85 59 D9 41 F1 97 02 14 45 EC F0 ED 2B 37
    53 06 DB 73 E9 AF 01 70 00 89 22 E5 CE 87

If this matches you can be sure that you have the original applet!

Flash upload file split applet download Download Version 0.5 - 14.4.2007

The download includes:

  1. Selfsigned TFU File Split Applet
  2. TFU File Split sources
  3. Scripts to selfsign the applet.

Please read the readme how to work with the sources. I don't give any support outside the forum for this small project.

Flash upload file split applet License License

The applet is open source and released under the LGPL.

Flash upload file split applet setup Setup

You can use this code to include the applet:

<!-- include with javascript - best solution because otherwise you get the "click to activate border in IE" -->
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
includeTfuApplet(100);
</script>
<!-- end include with Javascript -->
<!-- static html include -->
<noscript>
<applet codebase="."
code="de.tfu.FileSplitApplet" name="de.tfu.FileSplitApplet"
width=400 height=300
archive="fsa_signed.jar" align=top>
<param name="automaticSize" value="100">
</applet>
</noscript>
<!-- end static html include -->

Flash upload file split applet parameter Parameter

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;
}

Flash upload file split applet server support How to check if your server support splited files

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:

  1. Find your server limits - Open tfu_config.php (tfu installed on your server) - it tells you the php upload limit and the php memory limit.
  2. You can do the ftp or/and the image test.
    If you want to do the image test please create an image with a image software (e.g. Paint shop pro) that is bigger then your php upload limit
    Using png's with 16 Million colors is quite big ;). Normally these programs tell you what the uncompessed size of this image is.

    I have created 1 image you can use for testing:
    3000x2250_6MB_(40MB).png

    For the ftp test you simply need any file that is bigger than your upload limit!
  3. Split this file with the File Split Applet (use the size closest to your upload limit). use part as split prefix
  4. Enable support of splitted files in TFU by changing
    $split_extension="FALSE"; to $split_extension="part";
    in the file tfu_config.php
  5. Make sure if you do the ftp test that the file you have selected is in the $allowed_file_extensions list of tfu_config.php
  6. Upload all parts of the splitted file.
  7. The file should now be merged and be visible as one file on the left side.
  8. FTP test: Open your ftp and download this file. Check if this file is o.k. - At this point some server already have restrictions! They don't allow to process any files bigger than the upload limit. If the download works and the file is o.k. then normally you can use the Flash splitting capability!
  9. Image test: Select the file (that is an image) and a preview of this image should appear or the flash tells you that the flash cannot be processed (it detects that the memory is too little but if this can be detected the file can be read - php needs~ 2x the uncompressed size of the image to process it ) - if not php is can not load this files - means images bigger than the upload limit cannot be processed - if you check the tfu.log (only exists if an error happens and the tfu main dir is writeable) in the tfu directory of the server you should see an error message that the file is not valid (because php could only load a par of it) - if this is the case you cannot use the Flash splitting capability!

Have fun using TFU File Split Applet


 

esta-registration.co.uk

Follow TWG at
Twitter

Like TWG on Facebook
Facebook