TWG Flash Uploader Howto / FAQ

 Most needed and most important FAQ's

 Server related problems

 Basic questions

 Advanced configuration




 1. The Flash does not work.

This is the main question and there are several things that could be the reason. Mpst of the time it's a simple server setting that has to be adjusted.

  1. You don't have Flash 8 or 9 installed. You can check your version by right clicking on any flash!
  2. Clean the cache of your browser! Click a couple of time reload before you continue! Retry!
  3. Check if you have a file called tfu.log - errors are written in there if you don't have parse errors! (in JFU: administrator/components/com_joomla_flash_uploader/tfu/tfu.log). Check if you have any messages there and simply read them. Many of them really explain whats the problem (e.g. security restrictions, not enough memory, session.save_path in php.ini is not set correctly or points to a directory with no write access ....).
    You can write debug information to this file by using debug("your message"); in any of the php's. I write e.g. error messages if no proper gd lib is installed, an image cannot be processed ... (if you use the Flash in the TWG Admin the log file is the default log file of TWG - counter/_mydebug.log)
  4. You get an "undefined" right next to the TWG Flash uploader, the remote file list is not shown or you get that the configuration cannot be found or the session is lost. The flash needs to call the files in the tfu folder!
    Check if you can call tfu_config.php directly (since 2.7.5 tfu_login.php) (in TWG admin/tfu_config.php, in JFU: administrator/components/com_joomla_flash_uploader/tfu/tfu_config.php). Normally there a small info should be displayed. Then please check the following steps:
    1. Check if the file is there - if not - upload again!
    2. TFU can make a session workaround! If TFU detects a session problem it creates a folder called session_cache (for JFU administrator/components/com_joomla_flash_uploader/tfu/session_cache) and does the session handling internally. If you still cannot upload and the directory is not created please create it manually because TFU/JFU cannot create it automatically and set the permissions to 777! Please read howto 12. If this does not help please try the next steps.
    3. You don't have access to this folder or too little restrictions are used! - check if the permissions are right. Some servers to NOT allow 777 on php files (this is not needed). Try 775 or 755 instead! Check the log file - e.g. "error: directory is writable by others" is one of the possible errors. Or e.g. some files have only 600 as permissions. 755 is a very good value most of the time.
    4. You have a .htaccess somewhere that restricts that the files can be called. check this by calling tfu_config.php (since 2.7.5 tfu_login.php) and tfu_file.php directly.
    5. If this is not the problem you maybe have the Apache module suhosin active. If this is the case you have to set suhosin.session.encrypt=off. Otherwise the session id is encrypted. TFU is internally using a different parameter for the session because there are already many servers that remove session id's from url's to prevent session riding. And the flash needs to pass the session to tfu_upload.php because this is not done automatically by flash!
    6. If you have a php error displayed here you might shoud upload the files again or check any modifiction you made in the php files!
  5. The flash reports a http error 403/406 after the upload you should copy the provided .htaccess file to the tfu folder. Some servers handle the requests from the flash not how they should. You can force them to do it the right way by extracting the content of the htaccess.zip = the file .htaccess to the directory of the flash!
    The following 2 lines are in the .htaccess:
    SecFilterEngine Off
    SecFilterScanPOST Off
    Flash has a (known but not yet fixed) bug in the Upload header that causes this error if mod_security is enabled! The .htaccess file does disable this. This is not allowed on all systems. If this is the case you have to ask your hoster to do this for you. If they don't you cannot upload files with TFU (or any other flash solution!).
  6. If your progress bar goes very quick too 100% and the upload fails after this. Then you have maybe a firewall or security suite which caches the upload and causes the upload to fail. Please read howto 18 how to configure your firewall properly.
  7. Http error 500 or 503 can have several causes. It could be the problem described at 3.2 or at 5. Check this first. Check the tfu.log (see 4.) and the server log for errors. 500 means that there is an internal server error. The server log should help here. Errors in php files should be displayed there. If this problem happens when using TWG please set $add_iptc_at_upload to false in the config. Some servers have an error when ITPC data is extracted during upload!
  8. You get an io error: Sometimes this is a caching problem. Most of the time it helps to delete the browser cache and then to restart the browser. I only had this problem with Firefox once in a while. Try IE too because I never had this error with this browser ;).
    This problem does happen sometimes too if you have e.g. Norton Internet Security or other Spyware/Script stopping software. They seem to filter requests that come from flash. Disable the software and retry.
  9. If you have an ISS as webserver please read this post: http://www.tinywebgallery.com/forum/viewtopic.php?t=2295. 3. is important for TFU.
  10. HTTP 413 error: This is a really tricky one. This comes if apache does limit the upload. And this cannot be set by php.ini (see howto 14)! Ask your hoster to set the value of LimitRequestBody to a higher value!
  11. If it still does not work you should read this article
  12. contact me ;).

 2. How to configure the flash to work with HTTPS or if you get a 404 all the time!

First: The Flash does not work on all servers! I have found out that a valid certificate has to be installed on the server! If this is not the case you can still try but on my test systems where this was the case I didn't got it to work! Do always test on the server where you want to use TFU - don't test e.g. only at home - then it works but than later on the server you want to use it it doesn't.

Then lets configure the flash ;). Install the flash on a server and access it with HTTPS. First use Firefox and try to upload a file! If this does not work please check the certificate. If you don't get it to work with Firefox - sorry - no https possible.

But normally the problem is a IE problem only. The php classes are already patched to work with https :). The problem is that IE does not start the upload when only tfu_upload.php is called within the flash because it uses a wrong port with ie! Therefore you have to open twg_config.php and search for:

$upload_file= "tfu_upload.php";

You have now to add here the full path to the tfu_upload.php with the https port! e.g.

$upload_file= "https://www.tinywebgallery.com:443/path/tfu_upload.php";

If it works - have fun using TWG Flash Uploader.

404 Error: On some servers you get a 404 when you upload. This means that the tfu_upload.php can not be found. First try to call it directly. If this works you can add the full path to the file like shown above and retry.

Download: On some servers the download is restricted over HTTPS. If downloads fail please enable direct downloads in the configuration. If this is the case I recommend to enable file normalisation to avoid encoding problems.

 3. Some functions like 'create folder' do not work.

Most likely safemode is enabled on your system. The Uploader tries to detect this as good as possible. If this is the case I recommend to disable the browsing functionality of the flash. You can try to modify the safemode detection in the tfu_helper.php if you think the flash has the rights e.g. to create folder. create folders is btw. even disabled if a folder could be created but no files can be stored in there!

If the resize box is missing although it is enabled in the config most likely the gd lib is not installed or not at least version 2.0 - check the tfu.log for details!

 4. I cannot upload large files because the upload limit does not allow this!

There are some limits when you upload files. If you have the unregistered version you can only have 3 MB in the upload queue. This is the only limitation of the freeware flash. If you use the registered version and the flash says still something like - Upload maximum file size (per file): 2048 k. Then this settings are because of your limitations of your php installation. The uploader checks the limitations and sends them to the flash. There are two settings you can change to increase this limits in php.ini (see howto 14):

  • upload_max_filesize
  • post_max_size

Set this limits to the maximum file size you want to allow to upload (or ask your hoster to do his if you don't have access to the php.ini (see howto 14)). There are maybe other restrictions like timeouts you should maybe test. I have successfully uploaded an over 800 MB file on my system. It takes quite long because after the upload php copies the file from the temp dir to the real dir. Sometimes big upload do not work because there are file size limits on the server - ask your hoster if there is something like that. If you find out any special settings you changed to make the flash made working on the system - please let me know - I'll add this info to the FAQ.

Sometimes your server itself has some restrictions too. If you use Apache you get a http 413 error if LimitRequestBody in the configuration (httpd.conf or htaccess) is not set high enough. If you use IIS you might get an error 404 during the upload. Then you have to increase maxAllowedContentLenght (IIS7 configuration Editior: system.webServer/security/requestFiltering -> request limits). The default is ~ 30 MB.

If you get errors (most of the time IO errors) during the upload although you have increased the upload limits it's possible that your

  • max_input_time
  • max_execution_time
  • default_socket_timeout

are not set high enough. The times have to be higher than the maxumum upload time you want to allow. Be aware that other user might have slower connections too! If you change the settings and nothing happens it is on some server needed to restart them.

This settings can be set by a .htaccess file on some systems as well (see howto 14). If you still have restrictions please check if this settings are set like this. Depending on the server configuration it is possible to set this variables with .htaccess too! But you have to try if this works for you. The flash tells you at the startup what's your limit!

Resize problem

The normal upload works fine but if you want to resize images the upload fails. If you have this problem your php memory is to low. You cna solve this by:

  1. Increasing the php memory limit. This can be done by changing the vale memory_limit in php.ini (see howto 14). If you call tfu_config.php then the memory limit is shown and the maximum resolution which can be processed
  2. Using image magick. You have to have image magic installed on your server. If you have TWG installed on your server as well you can check this by calling info.php.
    You can enable it by setting $use_image_magic=true in the tfu_config.php. TFU uses the command line version if image magick. $image_magic_path defines the path to the convert command. Either specify the full path or put convert to the path. Ask your hoster if you don't know if it is installed.

 5. Can I use a .htaccess file (basic authentication) to protect the web page where the flash is?

The answer is: not really - Because it is not nice because the user is asked twice for it's password. The first time it is asked when you access the page and the 2nd time when you upload a file (and you are asked after the file is uploaded - then you have to upload enter username/password and then the upload starts again). And this is only tested for windows - I don't know how e.g. a Mac handles this!
I recommend to use the login of the flash itself. It is much nicer and more powerful because you can assign a directory for the user and you can give the user certain rights - check the .htusers.php and set $login="auth" in the tfu_config.php.

With IE this does work but with Firefox the 1st file you upload is corrupt - Therefore you would have to upload this file twice. Maybe I implement a workaround in the next version version of TFU where I upload the first file twice. But a user friendly website should use a better login method than the basic authentication of apache ;). If you want to use a login system to protect the flash please go to 8.

 6. How to enable thumb caching and pdf preview of the Flash.

By default the preview image you see on the flash are all generated on the fly. This is not very fast but most users don't need fast previews. If you want fast previews you can enable that a preview image is generated after each upload and if a preview is needed the image from the cache is used.
Simply create a folder named "thumbs" in the directory of the flash. Change the permissions of this folder to 777 - done.
The cache is automatically cleaned up. If a filed was not touched for 10 days then it is removed.

New 2.9: pdf preview

Since TFU 2.9 it is possible to enable previews of pdf's. To enable this you need image magick + the "thumbs" directory like described before. You can check if image magick is available on your system by calling the tfu_login.php directly.

 7. How to delete a directory with the Flash?

Deleting a folder is not obvious. You simply have to be in the directory you want to delete. If you have the rights to do this you get the "delete directory" option in the menu. After deleting a directory you are taken to the parent dir. The root dir cannot be deleted!

 8. How to use the flash if not all files are in one directory?

The default installation is having all files (including the calling page - by default: tfu.htm) in one directory. In a little bigger system you many want to have e.g. all tfu files in one sub directory and include the flash in your own application. I make a small example how the configuration should look like. You have to use at least TFU 2.8 that the example below works! If you plan to use the flash behind a security software you should read this too and 8. is very important for you.

  1. Lets assume you have all your tfu files in the folder /plugins/tfu, your page that includes the flash is in / and the folder you want to upload is /upload.
  2. The tfu_login.php has always to be in the directory where the calling page is - in this example this would be /.
    You can only change this if you change this in the source code. I have hard coded this because of security reasons (Not good if a caller can maybe use his own config file!)
  3. Adapt the path to the swfobject.js in the page you include tfu - in our example: plugins/tfu/swfobject.js.
  4. To find the xml language files you have to set the 'base' parameter at the flash. This is needed here because language files are loaded before the config is even loaded. - in this example you would have to add ?base=plugins/tfu/.
  5. Set the $install_path in tfu_login.php to the path where the tfu files are located - in this example: $install_path="plugin/tfu/"; This is important that the helper, users, license file, and the other tfu_*.php are found.
  6. Finally you have to set the path of the upload dir relative to the tfu folder! In this example you have to set $folder = "../../upload"; in tfu_config.php.
  7. If you you registered tfu copy the license file to the directory where the flash is - in this example: plugin/tfu/

It's possible to have a different setup: You have the flash + the tfu_login.php in one folder and the other files in a different folder. This is needed if you want to use TFU in a protected folder. tfu_upload.php cannot be inside this folder because Firefox is not passing the cookies properly and most likely your login software will restrict the access to tfu_upload.php. Therefore you have to place the flash and tfu_login.php into the protected folder and the other tfu files in a unprotected folder. Do the setup like described above plus you have to set $upload_file relative to the flash.

Test:
Put an image in your upload dir. Then you see if the flash can read your remote directory properly. If not please check the paths. Then select an image - a preview has to be shown. Then upload a file. If this three steps work the flash is working. If no directories can be created check the permissions. TFU writes errors to a file called tfu.log in the directory where the tfu_helper.php is located.

 9. How to change the colors of the flash - professional license or above

If you have a professional license or above you can change the colors of the flash. It's not possible to change everything (e.g. the colors of the buttons are defined in a theme and there you can only set 3 different ones. If you like to modify these to you need to modify the source code by yourself) but most colors can be changed. If you have a source code license you can either change the colors by yourself but of course use this settings too. You only have to remove the body of the method MLayout.as -> resetColors. If your license does already contain TWG_SOURCE in the domain this is not needed.

Colors does always have to be in the hexadecimal format. e.g. AA00FF unless something else is described. This are the possible colors you can change:

  • c_theme - The basic theme of the flash - possible settings are "haloOrange", "haloGreen", "haloBlue"
  • c_text - The basic color of all texts
  • c_text_header - The color of the header text (for popups too!)
  • c_header_bg - The background of the header
  • c_header_bg_2 - The 2.nd background of the header - makes a gradient fill from c_header_bg to c_header_bg_2.
  • c_bg - The main background
  • c_border - The color of the border
  • c_list_bg - The background of the list and the grid
  • c_list_header - The background color of the header of the grid
  • c_list_header_solid - set this to "true" if you like to have a solid list header. All gradients are fading to white because this is hardcoded in the core (new 2.8.3).
  • c_progress_text - The color of the text on the progress bar
  • c_progress_label - The color of the label left to the progress bar
  • c_progress_bar - The color of the moving part of the progress bar
  • c_progress_bar_bg - The color of the background of the progress bar
  • c_progress_bar_seperator - The color of the small seperators in the progress bar
  • c_popup_bg - The background color of popups like the login
  • c_popup_header_bg - The background of the headers of the popups
  • c_popup_header_bg_2 - The 2.nd background of the headers of the popups - makes a gradient fill from c_popup_header_bg to c_popup_header_bg_2
  • c_popup_border - The color of the border of the popups
  • c_bg_numbers - The background of the line numbers - This color is related to the backgound color but with an alpha channel - you have to find the right color e.g. with a tool that shows you the color of the background when faded.
  • c_numbers - The color of the numbers
  • c_status - The color of the status line. If not set c_text is used

To set a color you simly add e.g. so.addVariable("c_text", "FF00FF"); to the javascript call or as a parameter to the flash. You see two examples in the source code of this page (as comments). If you don't have a professional license or above and set colors this way then all colors are set to white.

 10. How to enable support for chinese/japanese file names?

The default setting of TFU/JFU does not support the correct display of chinese (or any non ISO-8859-1) files names. The reason is that ISO-8859-1 works on all servers. E.g. chinese file names are written as e.g. ????.jpg then. To fix this you have to set the correct encoding of your server. TFU does use the function iconv to convert the filenames to the right encoding. A list of supported encodings can be found here: http://www.gnu.org/software/libiconv/ .

To enable this you have to set $fix_utf8='' to the encoding you need. In JFU the parameter 'Fix encoding' has to be set. And you have to disable 'normalize file names'. I have sucessfully tested chinese with 'UTF-8' and 'Big5' (depending on the server).
You have to try your right encoding by yourself because I don't know your system. To check if you have the right encoding upload a file and the file has to be displayed right in TFU/JFU AND on your file system (check with ftp).

 11. Fullscreen preview of images does not work properly.

You forgot to add

so.addParam("scale","noScale");
so.addParam("allowfullscreen","true");
when including the flash. Check the code above how to include the flash.

 12. "Uploaderundefined" is the status bar after uploading or if you get a "Session Error" message.

  • Before TFU 2.10.4: "Uploaderundefined" is the status bar after uploading
  • Since TFU 2.10.4: 'Session Error' message

After uploading you get the error message "Uploaderundefined" in the title bar of TFU or a "Session Error" message. The reason is a session loss in tfu_uplad.php because the server thinks the flash is a new browser and does not allow to open the existing session. From 1.7 on TFU can detect this and tries to make an internal session handling. This is done by creating a directoy "session_cache" in the tfu folder. This is done automatically. But if TFU does not has the rights to do this you have to create this folder manually and set the permissions of it to 777. TFU does then store the session data in this folder and does the cleanup as well (old files are removed after 1 day!). For JFU you have to create the directory administrator/components/com_joomla_flash_uploader/tfu/session_cache.

The "Session Error" message tells you if the workaround was successful. If the folder could be created you only have to refresh the browser and are able to upload. If not you have to create the directroy like described before.

You can check if you have this problemby looking to the tfu.log file. There you find a message (if TFU/JFU is allowed to write a log file ;)). If you don't have a log file and the flash is not working you can either make the tfu directory writeable or take a look in the system error log of your server. Thisi s ued if the tfu.log could not be created!

 13. Howto use the flash standalone version in a secure way!

Important - only for the standalone version!

First of all you should update to at least TFU 2.7.1! Some checks where only made in the flash and not on the server side. Since 2.7.1 every possible input parameter is checked and validated the same way the flash does.

But you still have to integrate the flash properly into your environment to have a secure setup. Basically there are 2 usages of the flash:

  1. Completely standalone with the build in login mechanism:
    If you use this way then $login is set to "auth" and you don't have a problem because the check if the login is o.k. is done properly. Calling e.g. the tfu_upload.php does not work because the user is not logged in!
     
  2. Integrated into any kind of website that has any kind of login mechanism (CMS, simple page with login form ...) :
    Lets asume the following scenario: You have a website where you have a protected area and you want to integrate the flash there. You use a login to get to this site and have $login="true" set in tfu_config.php. You think this should be enough because no one can call the flash! This is not true at all! If anyone knows the location of the uploader he can directly call the flash and even upload files directly by sending faked request like the flash does! You have only made the site where the flash is in secure - not the flash itself!
    The solution is very simple! You have to check if this user that calles the flash is authorized! You have to check your system if the login was made properly and set this in tfu_config.php (since 2.7.5 tfu_login.php).
    The simplest way is:
    1. Set a session variable after you have sucessfully logged in into your main website (This is normally done anyway).
    2. Get this variable in tfu_config.php (since 2.7.5 tfu_login.php) with $_SESSION['<your variable>'] and add this check to the line where you find isset($_POST["twg_user"]).
      By default this line looks like:
      if ( isset($_POST["twg_user"]) && isset($_POST["twg_pass"])){
      Afterwards something like:
      if ( isset($_POST["twg_user"]) && isset($_POST["twg_pass"]) && isset($_SESSION['<your variable>'])){

      You can of course do more than simply checking if the variable exists. You can e.g. get this variable and check in your db is it is o.k. It's up to you and your existing system how you solve it! Only be aware that you have to do something!

If you have the flash accessible for everyone make sure that ony the file extensions that cannot harm you can be uploaded. Since 1.7.1 this extensions are checked in the flash AND on the server side again. If you use the flash like this you have to update!

TWG and JFU are checking the internal login already! Therefore you don't have a problem there! I still stongly recommend an update to the latest version (TWG 1.7.1 and JFU 2.7.1) because you still have the issue that not all parameters are checked and users that are authorized can fake requests! The minimum you should do is not allow users to rename files!
I'll provide update files for TWG which makes updating much easier on the download page!

 14. Where to find php.ini and how to use it

The php.ini is your php configuration file of your server. It's not part of TFU/JFU and you have to make changes here to increase some limits I have explained already e.g. in howto 4. There are several locations where the php.ini files is/can be.

  • Private hosting: In the config directory of your web server. For apache this is e.g. in the 'apache\bin' or the 'php' folder. The locations below should work too.
  • Shared hosting: If you are on shared hosting you normally cannot change the php.ini directly. But most hosters allow to have a custom php.ini in the root directory or even in a sub directory.
    • For TFU: Save your php.ini in the folders where you have located tfu_login.php and tfu_upload.php.
    • For JFU:
      • <joomla root>/administrator (That the right values are shown in the backend)
      • The tfu folder: <joomla root>/administrator/components/com_joomla_flash_uploader/tfu/
        OR if you have the tfu folder in the site: components/com_joomla_flash_uploader/tfu (for the flash itself.)
    If this does not work you have to ask your hoster! php.ini settings do not work recursive! Therefore you have to have the php.ini file in several folders.

The usage is really simple. You overwrite the settings from the default php.ini with the settings you set here. A simple example for a custom php.ini for TFU would look like this.

upload_max_filesize = 20M
post_max_size = 20M
memory_limit=64M
max_input_time=1800
max_execution_time=1800
default_socket_timeout=1800

This defines a 20 MB upload limit, php memory of 64MB and timeouts of 30 min. There are most of the time maximum limits by your hoster you cannot exceed.

For a complete list of settings that you may configure in the php.ini file, please refer to the PHP manual page found at http://www.php.net/manual/en/ini.list.php. Please be informed that the php.ini file does not require all of these settings; only enter the line that you wish to change from the default value.

When changing the maximum file upload size, please ensure you have changed both the upload_max_filesize and post_max_size configuration together.  The two settings should share the same value.

If you want to set this values in a .htaccess you have to add 'php_value ' before each setting e.g.

php_value upload_max_filesize = 20M
php_value post_max_size = 20M
php_value memory_limit=64M

If .htaccess or php.ini can be used depends on your hoster. Try - and if it does not work ask your hoster.

 15. How to send form fields with the upload - professional license or above

Since TFU 2.10 it is possible to that TFU reads form fields from the html page and adds then to the upload as 'get' parameters. To enable this you have to do the following:

Add input fileds to your page where the flash is included e.g.

<input id="tfu_field" type="textfield" />
<select id="tfu_select">
   <option value="en">English</option>
   <option value="de">German</option>
</select>

each elements need a unique id because this is needed in the configuration!

Then you have to insert the following Javascript to your page:

<script type="text/javascript">
function getTFUFormData(fields) {
var validateOk = true;
var spacer = String.fromCharCode(4);
// You have to return doNotUpload if you e.g. have mandatory fields and they are not filed.
// add the check to this function and return 'doNotUpload'. Then the upload is not started.
// noone should enter this
var doNotUpload = String.fromCharCode(5) + String.fromCharCode(4) + String.fromCharCode(5);

var result="";
var sarray = fields.split(",");
for (var i = 0; i < sarray.length; ++i) {
if (document.getElementById(sarray[i])) {
result += document.getElementById(sarray[i]).value;
}
result += spacer;
}
// if you validate and the validation fails return doNotUpload to prevent the upload
if (validateOk) {
return result;
} else {
return doNotUpload;
}
}
</script>

This Javascript does not to any validation of your input fields yet. You have to add this by yourself! This function does already exist in tfu.htm.

And finally you have to add all id's of the input fields as comma seperated list to the tfu_config.php:

$form_fields = 'tfu_field,tfu_select';

Currently this setting is not available in JFU directly. You have to do the setup like described here.

If you now upload a file the specified fields are sent as 'get' parameters with the upload. You can now easily read them in tfu_upload.php with e.g.

$tfu_select = $_GET['tfu_select'];

you can use the tfu function parseInputParameter to secure the input. It olny allows allows digits, word characters, whitespaces, '_' , ',' and ' '-'. e.g.

$tfu_select = parseInputParameter($_GET['tfu_select']);

The best way to read the parameters is to use a plugin. On the plugin page you can use the log plugin as base and extend it to your needs.

 16. How to pass parameters from your application to the flash

If you want to pass parameters from your application your can not do this directly by adding parameters to the flash because a request can be easily changed and this is not very secure. Especially if you want to set something like the upload directory. Howto 15 showed how to send form fields with the upload but the best way is to pass parameters over the session. The following short example shows how to do this with the upload folder:

1. Include the flash into a php page and set the directory into the session. You can of course set the directory anytime before.

<?php
session_start();
$_SESSION['mydir'] = 'upload';
session_write_close();
?>

<include the flash here>

It's best to close the session before you include the flash because depending on the page caching it is possible the the flash is loaded before the session is written to the disk (which is done at the end of the php file normally)

2. Get the data from the session and make it available for the flash: You can do this directly in tfu_config.php but I recommend to use a file called my_tfu_config.php (this does not exist - you have to create this) which is read by tfu_config.php and should only contain your settings. In our example this file does then look like this:

<?php
$folder = $_SESSION['mydir'];
?>

You can extend this example to pass anything you need in e.g. tfu_login.php or tfu_upload.php. If you only pass additional parameters you should also check out the plugin page because this is the easies way to get them without modifying any tfu files directly

 17. How to resize images during upload to a specified size

By default you have a dropdown box where the user can select between the sizes you have entered in the config file at $resize_data and $resize_label. And with $resize_default you select which is selected by default. If you want to resize all uploaded images to a specific size you have the following options:

  • Enter only one label/value pair at $resize_label/$resize_data.
  • If you want to hide the dopdown box set $resize_show = false;
    Additionally you have to:
    • 2.10 and higher: Set $resize_label and $resize_data and the $resize_default. The settings are sent even when the drowdown is not shown.
    • Before 2.10 the settings are NOT sent when the drowdown is not shown. Therefore you have to manually edit tfu_upload.php. Look for
          $size = (isset($_GET['size'])) ? parseInputParameter($_GET['size']) : 100000;
      and set your size there e.g.:
          $size=400;

 18. How to configure your firewall/internet security suite.

If you or one of your users has the problem that the progress bar goes very quickly to 100% but no upload finish does appear. Sometimes the upload works if you wait long enough and sometimes it even fails.

I have found out that there are some firewall/internet security suites which are caching the upload and don't deliver the proper return messages to the client. Currently it seems that only Kaspersky products do this. They have an "transparent proxy" where the whole file is cached and therefore the progress bar goes to 100% really quick. All uploads seem to be affected because I have found threads about this problem in other forums as well.

Since TFU/JFU 2.10.2 the flash does detect if an upload is extremely fast and starts an internal timer. If the upload does not finish in time a message box is shown which explains the problem and points the user to this howto.

Here you find the instructions how to configure Kaspersky Internet Security properly. I have installed the German and the English version. So you find the text for both languages below.

Kaspersky Internet Security 2009 (KIS 2009), Security Suite CBE 09:

English Deutsch
  • Settings
  • Protection -> Anti-Malware
  • Web-Traffic -> Settings
  • Trusted URLs -> Add the domain where the upload is. e.g. *.tinywebgallery.com* (don't forget the *)
  • Einstellungen
  • Schutz -> Anti-Virus
  • Web-Anti-Virus -> Einstellungen
  • Vertrauenswürdige Adressen -> Hinzufügen der Domain, wo der Upload ist z.B. *tinywebgallery.com* (die * sind wichtig!)

Kaspersky Internet Security 2010 (KIS 2010):

English Deutsch
  • Settings
  • Web-Anti-Virus
  • Security level -> Settings
  • Scan optimization -> Select 'Do not scan HTTP traffic from trusted web addresses -> Select
  • Add the domain where you want to upload to. e.g. *tinywebgallery.com* (don't forget the *)
  • Einstellungen
  • Web-Anti-Virus
  • Sicherheitsstufe -> Einstellungen
  • Untersuchung optimieren -> 'HTTP-Datenverkehr von vertrauenswürdigen Webadressen nicht untersuchen' selektieren -> Auswählen
  • Hinzufügen der Domain, wo der Upload ist z.B. *tinywebgallery.com* (die * sind wichtig!)

If you have a different firewall/security suite with the same problem please let me know. I will add the instructions then here as well.

Bookmark at
...

       
       

Follow TWG at
Twitter