- Upload Suite Overview
- What's New?
- Choosing Upload Technology
- Evaluating Upload Suite
- Upload Suite Editions
- System Requirements
- Installation and Deployment Notes
- ActiveX/Java Uploader
- HTML5/Flash Uploader
- Before You Started with HTML5/Flash Uploader
- HTML5/Flash Uploader Architecture
- HTML5/Flash Uploader User Interface
- Getting Started
- Using HTML5/Flash Uploader
- Uploading in ASP.NET
- Uploading in PHP
- Uploading in Other Platforms
- Uploading Images
- Customizing User Interface
- Configuring Common Upload Settings in HTML5/Flash Uploader
- Configuring Files to be Uploaded in HTML5/Flash Uploader
- Sending File at Once or in Several Parts in HTML5/Flash Uploader
- Configuring Fail-safe Upload
- Uploading Large Amount of Images
- Configuring Restriction Rules for Files
- Using HTML5/Flash Uploader at Runtime
- Using Host and Upload Domains that Differ from One Another
- Enabling Cross-Origin Resource Sharing for HTML5 Uploader
- Uploading to Amazon S3 with HTML5 Uploader
- Troubleshooting
- Reference
- Licensing Information
- Legal Notices
Configuring Common Upload Settings in HTML5/Flash Uploader
HTML5/Flash Uploader is a client-side application which does not save files on server disk. It simply submits user-selected files to a page specified in its settings and redirects users to another page when the upload is completed. The present topic describes how to specify a page to which HTML5/Flash Uploader submits files and a page where HTML5/Flash Uploader redirects users when upload is successfully completed.
Besides these URLs, HTML5/Flash Uploader allows to specify what and how many converted files should be sent for each user-selected file.
Upload and redirection pages can be set using the UploadSettings property of the ImageUploaderFlash class. Here the upload page is specified with the ActionUrl property, and the redirection page is specified with RedirectUrl.
<aur:ImageUploaderFlash ID="Uploader1" runat="server">
<UploadSettings ActionUrl="upload.aspx"
RedirectUrl="gallery.aspx" />
</aur:ImageUploaderFlash>$uploader = new ImageUploaderFlash("Uploader1");
$uploader->getUploadSettings()->setActionUrl("upload.php");
$uploader->getUploadSettings()->setRedirectUrl("gallery.php");var fu = $au.imageUploaderFlash({
id: 'Uploader1',
uploadSettings: {actionUrl:'upload.aspx',
redirectUrl:'gallery.aspx'}
}); The ActionUrl property specifies a URL to the page where files are posted. That page should contain the server code which parses the upload request, saves files to the necessary folders on server, and performs other additional actions. Usually, this URL must have a specific extension (depending on the web server settings). For ASP.NET platform it should be .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 would fail. If you want to submit files to the same page where HTML5/Flash Uploader is hosted, specify the dot character (.) as a value of this property.
When users upload files using the standard <input type="file"> element, they expect to be redirected to the page where they have submitted the files. However, HTML5/Flash Uploader works in a different way. The response generated by the page, which is specified with the ActionUrl property, is sent back to HTML5/Flash Uploader and not to the browser. As soon as HTML5/Flash Uploader receives this response, the upload is considered completed; and the user is redirected to the page specified with the RedirectUrl property. If you do not need this redirection, set this property to an empty string.
When specifying these properties, take into account the following cases:
Using Quotation Marks and Semicolons
URLs can contain semicolon or quotation mark characters (e.g. http://upload.server.com/uploadFile;jsessionid=123?param='value'). If they do, enclose such URLs in single (' ') or double (" ") quotes to avoid parameter parsing errors. Moreover, quotation marks (both single ' and double ") inside URLs should be escaped with a backslash:
"http://upload.server.com/uploadFile;jsessionid=123?param=\'value\'"
Using Absolute and Relative URLs
URLs can be both absolute (e.g. "http://domain.com/Gallery/gallery.aspx") and relative to the current page (e.g. "/Gallery/gallery.aspx").
For instance, if HTML5/Flash Uploader is inserted into the http://domain.com/ImageUploaderFlash/default.aspx page, the relative URLs specified via the RedirectUrl property will correspond to the following locations.
| Specified URL | Expected Location |
|---|---|
"/Gallery/gallery.aspx" |
http://domain.com/Gallery/gallery.aspx |
"./Gallery/gallery.aspx" |
http://domain.com/ImageUploaderFlash/Gallery/gallery.aspx |
"Gallery/gallery.aspx" |
http://domain.com/ImageUploaderFlash/Gallery/gallery.aspx |
"gallery.aspx" |
http://domain.com/ImageUploaderFlash/gallery.aspx |