URL of the page to which files selected for upload in Image Uploader are sent to.
Syntax
Initialize
JavaScript | ![]() |
---|---|
<script type="text/javascript" src="iuembed.js"></script> <script type="text/javascript"> var iu = new ImageUploaderWriter("ImageUploaderID", 610, 500); //...other params... iu.addParam("Action", "."); //...other params... iu.writeHtml(); </script> |
Get/Set Value in Runtime
JavaScript | ![]() |
---|---|
getImageUploader("ImageUploaderID").setAction(value); value = getImageUploader("ImageUploaderID").getAction(); |
Property Value
A string that specifies the URL to the page files are posted to. You can specify several URLs in this property. They should be separated by a semicolon character (;
). Note that if you need this character in your URL string (like in this one: http://upload.server.com/uploadFile;jsessionid=123?param=value
), you need to URL-encode it, that is replace the semicolon character with the %3B
sequence.
If you want to submit files to the same page Image Uploader is hosted on, use the dot character (.
).
Default value is ".".
Remarks
Image Uploader is just an ActiveX control / Java applet which does not save files on server disk by itself. It just submits these files to a page specified by this URL (as a HTTP POST request in standard multipart/form-data format defined by RFC1867). That page should contain the server code which parses this POST request, saves files to necessary folders on server and performs any other additional actions.
![]() |
---|
Usually this URL must have a specific extension (depending on the web server settings). For ASP platform it should be .asp, for ASP.NET the extension is .aspx, for PHP it is .php, for Perl it can be .pl or .cgi, etc. In other words, the file containing this script should have the extension registered in the settings of your web server as a server page. Otherwise upload will fail. |
Image Uploader SDK includes a number of code samples for different server platforms:
If multiple URLs are specified, Image Uploader alternates them when submitting requests. E.g. if you specify three URLs and upload five files (each file in a separate package), the sequence will be the following:
- File 1 - URL 1
- File 2 - URL 2
- File 3 - URL 3
- File 4 - URL 1
- File 5 - URL 2
When a new upload session is started (i.e. the Send button is clicked again), the upload will begin from the URL which is next to the last one used (unless the user refreshes the page, of course). In the example discussed above, it will be URL 3.
![]() |
---|
It is important to distinguish between the upload session, as it appear to the user, and the POST request sent by Image Uploader. Whole upload session can
be divided into several requests, depending on the value of the FilesPerOnePackageCount property. Most typical case is
when each file is sent in a separate request (i.e. It is important to keep this in mind when you use such features as concurrent upload, automatic upload resuming, several destination URLs, etc. |