This topic contains answers for the frequently asked questions related to problems with upload process. Be sure to read this topic before creating support case.
In this topic:
Probably, there are some errors in your Image Uploader embedding script. For example, addParam method has a wrong call syntax or the specified parameter does not exist.
To debug such errors Image Uploader embedding scripts library exposes the IUCommon.debugLevel
parameter. If it is set to 2
you will get warnings in most cases when syntax errors occur. See the
Library Overview topic for the detailed information about debug levels.
This message means that the server page, which you upload files to (specified with the Action property), cannot be run properly. It may be:
To get more detailed information about this error, you can do the following:
true
. It will
have Image Uploader to open a window containing the
HTML code returned from the server. Typically, a web server writes the error message into
it.See the Debugging Server Scripts topic for more information on how to debug server errors.
First of all check a path and permissions of the folder you save files to. If it is correct and the problem still
persists, probably, you have an error in your upload script (specified with the Action
property). The point is that PHP applications may not return other than 200 HTTP codes but send the result page in the response.
So, to debug your script, enable display_errors
parameter in php.ini and
set the showNonemptyResponse of your ImageUploaderWriter
instance to alert
. This way you will see an alert containing the response from your upload script
whenever it is received.
See the Debugging Server Scripts topic for more information about showNonemptyResponse property.
This message states that the server with the name, specified in the Action parameter cannot be found. The reasons are:
This error means that the server closed the connection unexpectedly. Typically, it happens when the server has some server-side limitations for maximum POST request length. Main indicator of this situation is that the problem occurs when the total upload size exceeds some value.
Another possible problem is that script execution timeout expires.
Both timeout and maximum POST request length are configured in the server settings. Find more information on how to resolve this problem for the following server environment:
Typically, this problem occurs when server-side limitations for maximum POST request length are configured. See the previous question of this FAQ for more information on how to get this problem fixed.
The main reason of this problem is that Image Uploader does not support redirection from the upload script. So, if your server-side script attempts to redirect to some page the upload will be stopped and you will get this error message. This may occur in the following cases:
1. You lose session or authorization cookies in Image Uploader Java
This case is related to Image Uploader Java only and implies that Java version loses HTTP-only cookies during upload. In detail, it can be explained as follows. When Java version of Image Uploader prepares a POST request before uploading it to the server, it extracts all the cookies which are downloaded along with the page that hosts the applet. To get the cookies, Image Uploader uses the same object model as you do in JavaScript (as if you use document.cookie). However, this model does not allow retrieving HTTP-only cookies. As the result, these cookies will not be attached to the POST request as well as sent to the server.
Thus, when you use HTTP-only cookies to keep authentication tickets your server-side upload script will not be able to recognize the user who initiated the upload. Probably, your script will try to redirect the user to a login page, but such action is not supported by Image Uploader. So, the upload process will fail.
To avoid this problem you can explicitly attach HTTP-only cookies to the upload request using the AddCookie() method as it is described in the Preserving Sessions and Authentication Tickets Passed in Cookies topic. Another way is to use Image Uploader ASP.NET control or Image Uploader PHP library to embed Image Uploader into your web application. This way you do not need to care about keeping your cookies saved because the ASP.NET control as well as PHP library performs this action itself.
2. You redirect users to some page after upload completion
If you want to redirect the user after upload do not use server redirection for it. Among the server redirection methods are Response.Redirect in ASP.NET, header("Location: ...") in PHP, and others. However, this problem can be solved through Image Uploader facilities. See the Handling Upload Completion topic which describes all available solutions.
3. You use custom error pages
In the case when your server is configured to use custom error pages it will automatically redirect your upload script to the corresponding page if some error occurs. However, as it was said above, Image Uploader does not support such redirection.
To eliminate this problem you should disable custom error pages and debug your upload script using Debugging Server Scripts guidelines.
Try to increase the value of the TimeOut.
See the Configuring Automatic Upload Recovery topic.
See the Uploading Additional Data with Files topic.
First of all, make sure that the form name is the same as the AdditionalFormName property. Also, check for misprints of field names in your server-side code.
If you are using Java version, take a look into Java console. Image Uploader writes all fields it recognizes into the console. If you see your fields there, you should try to debug your server page.
If you are sure that the server code is correct, try to reproduce the same problem with simplified HTML code. In other words, do the following:
If additional data is uploaded from the simplified page successfully, it means that the problem occurs because of malformed HTML code in your original page. So you should re-format it to make it valid. Alternatively, you can use AddField() method instead of HTML form.
Since version 6.0 Image Uploader does not support UploadThumbnailXFallbackMode group of properties and introduces the UploadThumbnailXCompressionMode group (UploadThumbnail1CompressionMode, UploadThumbnail2CompressionMode, UploadThumbnail3CompressionMode, and UploadThumbnailCompressionMode) instead. New properties completely replace UploadThumbnailXFallbackMode functionality and provide additional features like ZIP compression. Find the detailed information on how to use UploadThumbnailXCompressionMode properties in the Handling Files Compression topic.
If you need to implement the UploadThumbnailXFallbackMode finctionality via the UploadThumbnailXCompressionMode properties use the code sample below:
// Send the source file if the first thumbnail cannot be created // Similarly to UploadThumbnail1FallbackMode = "SourceFile" iu.addParam("UploadThumbnail1CompressionMode", "*.*=Jpeg,SourceFile"); // Send an icon if the second thumbnail cannot be created // Similarly to UploadThumbnail2FallbackMode = "Icon" iu.addParam("UploadThumbnail2CompressionMode", "*.*=Jpeg,Icon");