#summary Frequently Asked Questions (and Answers)
#labels Featured
== Frequently Asked Questions ==
*Why do we need to post the session id?*
Posting the session id to the upload script allows you re-establish the session on the other end of the flash call. Usually you shouldn't need to re-establish the session but some browsers lose the session when the request for the upload script comes through flash player. The reason we add a session to the demos is to demonstrate this point for security, like double checking a user authentication before allowing them to upload.
*Why don't the demos save files?*
We don't save files on the demo site for security reasons and it would leave a big mess to clean up later.
*My upload script in PHP has a fatal error with low memory_limit when resizing images. How do I deal with this?*
Low memory_limit is usually due to how the GD library opens up a JPG in
memory to manipulate it. In my best explanation, JPEG is like zip it is only small to cross the wires. When you need to change it using PHP's GD library it will work on the full image
uncompressed in memory. Open up your image in photoshop, look at the
'document size' in the photoshop lower left status bar. Lots of those 2-4MB JPEGs
are actually 20-25MB uncompressed images and that is how the GD library will use them in
memory. Default memory limit is 16M in most php.ini setups but they can be overwritten by
.htaccess or the PHP script in most cases with safe mode turned off. Try limiting
the image's uncompressed size by resizing the image and trying again. Then try to
capture and deal with that error so you can send something meaningful back to the
{{{JavaScript}}}.
*Is it possible to replace back end server script from PHP to ASP or ASP.Net ?*
Yes, you can process the upload with any server-side scripting language you prefer. Our demos have PHP and ASP.NET examples but they are by no means production ready or secure. We will leave that up to your capable hands.
*I put the demo files on a server but it's work, could you tell me why ?*
First check, if you are using any version of SWFUpload less than 2.2.0 then it will not work with Adobe Flash Player 10 installed and because of their security [http://www.adobe.com/devnet/flashplayer/articles/fplayer10_security_changes_02.html#head3 'improvements']. Starting with 2.2.0 we had to make some drastic changes to how SWFUpload works with Flash 10 Player. I would recommend using 2.2.0+ if you can't lock down the plugin to Flash 9 and lower in your environment. Next step, turn debugging on to narrow down the problem by setting debug: true in your settings object.