URL of the page to which files selected for upload in Video Uploader are sent to.

Syntax

Initialize

JavaScript

<script type="text/javascript" src="iuembed.js">  </script>
<script type="text/javascript">
var vu = new VideoUploaderWriter("VideoUploaderID", 610, 500);
//...other params...
vu.addParam("Action", ".");
//...other params...
vu.writeHtml();
</script>

Get/Set Value in Runtime

JavaScript

getVideoUploader("VideoUploaderID").setAction(value);
value = getVideoUploader("VideoUploaderID").getAction();

Property Value

A string that specifies the URL to the page files are posted to. When specifying this value, take into account the following cases:

Uploading to Several URLs

You can specify several URLs in this property to upload files to several servers. In this case you should specify these URLs separated by a semicolon character (;):

URL1;URL2;URL3;...

Using Quotation Marks and Semicolons

URLs can contain semicolon or quotation mark characters (like this one: http://upload.server.com/uploadFile;jsessionid=123?param='value'). If so, to avoid parameter parsing errors enclose such URLs in single (' ') or double (" ") quotes. Additionally, quotation marks (both single ' and double ") inside URLs should be escaped with a backslash:

"http://upload.server.com/uploadFile;jsessionid=123?param=\'value\'"

Uploading to the Same Page

If you want to submit files to the same page Video Uploader is hosted on, specify the dot character (.) as a value of this property.

Default value is ".".

Remarks

Video Uploader is just an ActiveX control 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.

Note

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, 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.

Video Uploader SDK includes the code sample for ASP.NET server platform.

Using Absolute and Relative URLs

URLs can be both absolute (e.g. vu.addParam("Action", "http://domain.com/upload/upload.aspx")) and relative to the current page (e.g. vu.addParam("Action", "/upload/upload.aspx")).

For example, if Video Uploader is inserted to the http://domain.com/VideoUploader/default.aspx page, the relative URLs specified via this property will correspond to the following locations.

Specified URLExpected Location
"/upload/upload.aspx"http://domain.com/upload/upload.aspx
"./upload/upload.aspx"http://domain.com/VideoUploader/upload/upload.aspx
"upload/upload.aspx"http://domain.com/VideoUploader/upload/upload.aspx
"upload.aspx"http://domain.com/VideoUploader/upload.aspx
Uploading to Several URLs

If multiple URLs are specified, Video 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:

  1. File 1 - URL 1
  2. File 2 - URL 2
  3. File 3 - URL 3
  4. File 4 - URL 1
  5. 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.

Note

It is important to distinguish between the upload session, as it appear to the user, and the POST request sent by Video 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. FilesPerOnePackageCount = 1). In this case the server code located on the page specified with this property will be executed as many times as the files are sent by the user, like if the user selected each file one by one and upload them separately.

It is important to keep this in mind when you use such features as concurrent upload, automatic upload resuming, several destination URLs, etc.