Installation
1. Extract the content of the zip to a directory on your web space.
2. Change the permissions of the folder 'upload' to 777
(this is only the folder for testing - I think you will change this later ;))
3. Call tfu.htm. The example files should show up on the left side.
You cannot call the flash directly because it need the server side php files for configuration and input!
If it does not work please read the FAQ.
Setup
By default the user is logged in automatically and you can use the TWG Flash Uploader right away.
The tfu_config.php is the main configuration file.
There are 2 interesting settings you should look at first:
- $login - you can implement your own authentification by setting this flag! If you use "auth" a login screen appears
- $folder - The folder where your uploads will be saved!
Important: Please read TFU how-to 13 for a secure setup of the flash!
The handling of the login and the folder is very static in the basic implementation. If you want to see a running example with authorization and different working folders you can check the code of the TWG Admin of the TinyWebGallery or JFU.
The other parameters are explained in the tfu_config.php.
The flash can have the following parameters!
- lang is the switch for the language - the the lang folder for valid entries e.g. ?lang=de
- session_id - you can specify a session id by passing the current session id - it will be added to every call to the server. Please note: If you want to pass variables over the session this parameter is mandatory because Firefox does not handle this properly otherwise!
- session_name - The default of this value is TFUSESSID. I do not use the default PHPSESSId because it you set session.use_trans_sid=off then this would be filtered and upload would fail! I recommend NOT to change this
- base - This is only needed if you use the flash if not all files are in one directory. Needed to load the language files properly - Read howto 8 of the TFU FAQ.
- c_* - color settings of the flash - available if you have a professional license or above. See howto 9.
The flash can be embedded with the following code to any page (see tfu.htm). This code uses the swfobject.js that is a workaround for the eolas restriction in Internet Explorer:
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
document.write('<div id="flashcontent"><div class="noflash">TWG Flash Uploader requires at least Flash 8.<br>Please update your browser.</div></div>');
var so = new SWFObject("twg_flash_uploader.swf?lang=en", "mymovie", "650", "340", "8", "#ffffff");
so.addParam("scale","noScale");
so.addParam("allowfullscreen","true");
so.write("flashcontent");
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="650" height="340" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="twg_flash_uploader.swf" />
<param name="scale" value="noScale" />
<param name="quality" value="high" />
<param name="allowfullscreen" value="true" />
<param name="bgcolor" value="#ffffff" />
<embed src="twg_flash_uploader.swf" quality="high" bgcolor="#ffffff" scale="noScale" allowfullscreen="true" width="650" height="340" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>