MultiPowUpload 3.1
FAQ |
![]() ![]() |
MultiPowUpload FAQ (Frequently Asked Questions)
This section describe how to use MultiPowUpload control and answer on Frequently Asked Questions
2. How to include MultiPowUpload on a page
4. How to use MultiPowUpload events and methods
5. How to register MultiPowUpload?
6. How to hide my SerialNumber on a web page?
7. How to redirect users to another page when upload/download process is complete?
9. How to send additional information to server?
1. MultiPowUpload displays the message "This copy of MultiPowUpload software registered to another domain...". What to do?
Unfortunately, client-side control like Flash movie are defenseless from page source view and copying.
Starting from version 3.0, MultiPowUpload includes domain name hash in the serial key.
You should enter your domain name during purchase.
If you have a single domain license and change your domain, you should buy another license or pay domain change fee on the purchase page or upgrade the single domain license to the enterprise (unlimited domains) on the upgrade page.
You can use MultiPowUpload on the tesing site/server for free. Close the alert window after it appears or remove the serial number from parameters to make MultiPowUpload work as trial.
2. How to include MultiPowUpload on a page:
-
a. Usage of SWFObject.
SWFObject is javaScript library that helps you to place Flash movies on a page easily.
Read more about SWFObject here: http://code.google.com/p/swfobject/
Put the following code on the page:
<!-- div element will be replaced with MultiPowUpload flash movie. -->
<div id="MultiPowUpload_holder">You need at least version 10 of Flash player. Download the last version
<a target="_blank" href="http://www.adobe.com/shockwave/download/alternates/">here</a>!
</div>
<!-- SWFObject home page: http://code.google.com/p/swfobject/ -->
<script type="text/javascript" src="Extra/swfobject.js"></script>
<script type="text/javascript">
var params = {
BGColor: "#F8F6E6"
};
var attributes = {
"id": "MultiPowUpload",
"name": "MultiPowUpload"
};
//Here MultiPowUpload parameters should be specified
var flashvars = {
"uploadUrl": "FileProcessingScripts/ASP.NET/CSharp/uploadfiles.aspx",
"useExternalInterface": "true"
};
swfobject.embedSWF("ElementITMultiPowUpload3.1.swf", "MultiPowUpload_holder", "450", "350", "10.0.0", "Extra/expressInstall.swf", flashvars, params, attributes);
</script>
-
b. Classic method with <object> and <embed> tags.
<OBJECT id="MultiPowUpload" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0"
width="450" height="350" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT>
<!-- Replace symbols " with the " at all parameters values and
symbols "&" with the "%26" in URL values or & other values!
The same parameters values should be set for EMBED object below. -->
<PARAM NAME="FlashVars" VALUE="uploadUrl=FileProcessingScripts/PHP/uploadfiles1.php&maxFileCount=1&httpErrorDescription_405=There is no such page on server&httpErrorDescription_500=lufsielfb&httpErrorMessage=<center>HTTP Error, '<ERRORCODE>' occurred. <DESCRIPTION> </center>">
<PARAM NAME="BGColor" VALUE="#F8F6E6">
<PARAM NAME="Movie" VALUE="ElementITMultiPowUpload3.1.swf">
<PARAM NAME="Src" VALUE="ElementITMultiPowUpload3.1.swf">
<PARAM NAME="WMode" VALUE="Window">
<PARAM NAME="Play" VALUE="-1">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE="">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE="">
<PARAM NAME="AllowScriptAccess" VALUE="always">
<PARAM NAME="Scale" VALUE="ShowAll">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<PARAM NAME="Profile" VALUE="0">
<PARAM NAME="ProfileAddress" VALUE="">
<PARAM NAME="ProfilePort" VALUE="0">
<!-- Embed for Netscape,Mozilla/FireFox browsers support. Flashvars parameters are the same.-->
<!-- Replace the symbols " with the " in all parameters values and
symbols "&" with the "%26" in URL values or & other values! -->
<embed bgcolor="#F8F6E6" id="MultiPowUpload" name="MultiPowUpload" src="ElementITMultiPowUpload3.1.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="450" height="350" flashvars="uploadUrl=">
</embed>
</OBJECT>
It is important to set both the name and id attributes in <object> and <embed> tags if you would like to use JavaScript methods and event handlers!
All MultiPowUPload parameters should be specified inside flashvars attribute of <object> and <embed> tags. Delimiter is '
&' symbol.
Replace symbols " with the " at all parameters values and
symbols "&" with the "%26" in URL values or & in other values!
3. How to setup parameters
There are 3 ways to specify parameters:
1. Using flashvars attribute of <object> and <embed> tags. The same set of parameters should be specified in flashvars attribute <object> and <embed> tags. Check previous section (2. How to include MultiPowUpload on page) to see an example.
2. If you use SWFObject to put MultiPowUpload on a page, you should set array of MultiPowUpload parameters in this way:
//Here MultiPowUpload parameters should be specified
var flashvars = {
"uploadUrl": "FileProcessingScripts/ASP.NET/CSharp/uploadfiles.aspx",
"useExternalInterface": "true"
};swfobject.embedSWF("ElementITMultiPowUpload2.1.swf", "MultiPowUpload_holder", "450", "350", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
3. Using external xml file, specified with externalVariablesUrl parameter
Example of xml file:
<?xml version="1.0" encoding="UTF-8"?>
<MultiPowUpload_parameters>
<!--Example of external propetries file-->
<param name="sendTestRequest">false</param>
<param name="removeButtonVisible">false</param>
<param name="httpErrorCodeDescription_413">Request Entity Too Large.<br>
For IIS servers: 1. Try to increase UploadReadAheadSize metabase property.<br>
2. Try to increase MaxRequestEntityAllowed property value in IIS config.<br>
For apache servers: Try to increase LimitRequestBody parameter in httpd.conf
</param>
</MultiPowUpload_parameters>
4. Using JavaScript setParameter method.
Example:
MultiPowUpload.setParameter("uploadUrl","uploadfiles.php")
;
4. How to use MultiPowUpload events and methods
1. Set MultiPowUpload parameter useExternalInterface to true (false by default) .
3. Set MultiPowUpload parameter javaScriptEventsPrefix to a necessary value ("MultiPowUpload" by default) .
To use MultiPowUpload events, you should declare appropriate JavaScript functions. Function name format isjavaScriptEventsPrefix+'_'+eventName. List of all available MultiPowUpload events is available in events section.
Example:
function MultiPowUpload_onAddFiles(addedFiles) { window.alert("Now total files in list is " + MultiPowUpload.getFiles().length+". Count of added files is "+addedFiles.length); }MultiPowUPload automatically initializes JavaScript object with the name specified in id and name attributes of SWFObject or <object> and <embed> tags depending on publishing method. In other words you can use MultiPowUpload methods right after onMovieLoad event.
Example:
function MultiPowUpload_onMovieLoad() { //Here and later you can use call MultiPowUpload methods like this; MultiPowUpload.getFiles(); //Where MUltiPowUpload is id (and name) attributes of <object> and <embed> tags or the same attributes from SWFObject.
}
If you put MultiPowUpload on page using <object> and <embed> tags, you should set both name and id attributes to the same value for correct initialization of MultiPowUpload JavaScript object.MultiPowUpload.sortFileList("SIZE", "ASC");
5. How to register MultiPowUpload?
You can make MultiPowUpload trial to work as full by setting parameter serialNumber .
6. How to hide my SerialNumber on a web page?
Starting from version 3.0, a single domain license will work only on the domain specified during the purchase, so even if someone gets your serial, MultiPowUpload will not function properly on other domain.
7. How to redirect a user to another page when upload/download process is complete?
Specify the parameter redirectUploadUrl to url of the page which should be loaded when upload process is complete.
MultiPowupload post information about upload process results to this page. MultiPowUpload sends following information about each file (#INDEX# is index of file from 0 to count of files -1) :MultiPowUploadFileSize_#INDEX# - file size. MultiPowUploadFileId_#INDEX# - file id. MultiPowUploadFileDate_#INDEX# - file modification date. MultiPowUploadFileName_#INDEX# - file name. MultiPowUploadFileStatus_#INDEX# - file status. Check possible values here.
8. How to upload thumbnails?
To enable file thumbnail upload feature, set sendThumbnails to true.
Specify thumbnail.width and thumbnail.height parameters to necessary values.
If you need to upload original image, set sendOriginalImages to true.
MultiPowUpload supports the following image formats for thumbnail generation: JPG (by default) , PNG.
You can change thumbnail format specifying thumbnail.format parameter.
9. How to send additional information to server?
You can send additional information in several ways:
- a. Add info to uploadUrl property.
For example:
"uploadUrl": "uploadfiles.php?paramname1=value1¶mname2=value2"
- b. Specify formName property.
In this case you can add a form to your html page and MultiPowUpload will automatically add form values to HTTP request.
- c. Specify customPostFields property.
Array of custom fields and values that will be added to the request separated by |
Example:
filedName1;value1|FieldName2;value2
- d. Use JavaScript addPostField(String name, String value) method.
It adds “name–value” pair to the list that will be sent as text Form items with all files.Example:
MultiPowUpload.addPostField("Username","JDoe");
- e. Use JavaScript addFilePostField(Stgring fileId,String name, String value) method.
It adds “name–value” pair to the list that will be sent as text Form items with a specified file.Example:
MultiPowUpload.addFilePostField(file.id, "Username","JDoe");