ActiveXObjects.com Web SDK

This page links to all the manuals and examples for the ActiveXObjects.com examples. If the controls are not installed on your machine at this time, they will be installed when you run the examples, and you must be online for the browser to be able to install the relevant control/s.

You can view the source code for any example by right clicking the page, and selecting view source. The code is commented and you can just cut and paste it to get started in your own website.

There are currently few demos which upload to the asp.net upload script, but you can change this for any other demo by changing the file extensions for the URLTo and RedirectTo parameters from ".asp" to ".aspx", and to ".php" for PHP upload demos.

All controls are implemented for Internet Explorer and Netscape/Mozilla. The Netscape implementation does not support Active scripting and events.

Contents
Links to the examples and the technical manuals are listed below.
How to work this on your desktop...
Basic flow of process...
Troubleshooting...
Boomerang Upload Examples Manual
ImageUpload Examples Manual
Picasso Examples Manual
FileshipX Examples Manual
Click here to return to ActiveXObjects.com




Boomerang Upload   To Contents
Boomerang upload lets you overcome the problem of uploading many files from a browser. It also has other features that extend it's basic functionality, such as reading a web form out of the HTML document.
Simple Demo Example of dual browser setup for running control in Internet Explorer and Mozilla/Netscape/Gecko/Opera platforms. This is the recommended implementation.
German Language Same as previous but with german language strings applied.
Demo 1 Boomerang Upload demo showing how to provide alternative upload if the control does not load. Requires no script, but does not load the Netscape plugin control.
Asp.Net Example Uploads to an asp.net script on the server. You must have asp.net installed to do this. You can get it free from microsoft.com. It is 23MB for the basic install and works like asp once installed. Basically the main difference from the browsers point of view is that asp.net files are called .aspx and handled by the .net engine. Get it today if you have not done so already...
PHP Example Uploads to php script. You must have php installed for this to happen. There is a nice small exe cgi version available for this from php for no charge.
Custom Toolbar Shows how to make your own toolbar for the control. This is if you need to customize the look for your own website. This custom toolbar implementation will only work for the Internet Explorer version of the control.
Form Post This demo shows you the control being used like a form. The data is posted through the browser just like a normal form would be, so you do not even have to change your upload scripts if you use it this way.
Form Post 2 Shows the control being used with some other ActiveX controls and some form inputs. This example will only work on Internet Explorer with javaScript enabled.




ImageUpload   To Contents
ImageUpload is for allowing your users to see their image before it is uploaded,. It supports forcing of size and format, so if you need images of a certain height, width and format on your server, you can preset this. It also applies some basic editing functions to images as needed.
Simple Demo Example of dual browser setup for running control in Internet Explorer and Mozilla/Gecko platforms.
Demo 2 Demo showing how to force the format, size and name of the uploaded image. If you need to collect, for example, images that are .jpg format and all 468 by 60 pixels in size, then your users can select any image format, and it will automatically be converted prior to uploading.
Form Post Shows how to use the control as a form, combining image data to be uploaded with regular form data like text input and checkbox options. Works on all browsers, but Internet Explorer is required in order for the controls to load, otherwise normal HTML controls are used.
Form Post 2 Multiple instances of the control, and all image data uploaded in one upload request. Works on all browsers, but Internet Explorer is required in order for the controls to load, otherwise normal HTML controls are used.




Picasso   To Contents
Picasso is for image uploading and editing. Users can download their images from a server, edit them in the web page using the very functional image editor and then save them back to the server. Like when you need to put that "SOLD" sign across a picture of a house that was for sale.
Simple Demo Example of dual browser setup for running control in Internet Explorer and Mozilla/Gecko platforms.
Demo 1 Shows the control used to select and upload an image.
Demo 2 Here the control is made to upload the image with required height, width, format and filename. No matter the format of the input image, what arrives at the server is always what you specify.
Form Post Shows how to use the control with other form data, and then use the browser to post all the data to the server.
Edit Puts the control next to a list of graphic files, and loads a graphic file in the control when you select one.








FileShipX   To Contents
File uploader control for web browsers with the familiar Windows Explorer style interface.
Simple Demo Recommended implementation for the FileShipX control. Loads either ActiveX for Internet Explorer or Netscape plugin for Netscape/Mozilla browsers. Also provides a small alternative HTML upload if a user did not want to install the control.
Form Post Alternative way to use the control. The demo shows how to use the control to upload other data besides files, using "100%" compatible multipart/form-data post encoding. Works only in Internet Explorer due to the object scripting required.




Setup   To Contents
If you are running this page in Internet Explorer through IIS, then it is already setup. All the demos should work as long as the domain is "localhost". For other domain functionality, you must specify your domains so that we can provide you with a license file for those domains.
This control SDK and examples has been tested successfully on Windows XP, Windows 2003 and Windows 2000 servers using all modes of configuration. Other errors might arise during use due to server side settings, such as PHP maximum upload size in PHP.ini, or similar settings in IIS which prohibit large uploads to the server. Please consult yor documentation for more info, or contact Merlix directly.




Basic Process Flow   To Contents
This is a simple breakdown of each major stage in the ActiveX usage process. Generally, this is how all the controls work in the bigger picture.
  • Browser loads web page
  • In web page, is code for ActiveX control
  • Browser loads control
  • Control initializes and is ready once page has loaded
  • User edits files, or specifies files for uploading
  • User specifies to save data to server
  • Control checks it license data. If licensed, then upload commences.
  • Data is uploaded to server.
  • Server passes data to upload handler. Example asp,asp.net,php,isapi or CGI.
  • Upload handler saves data to file or database.
  • Upload handler writes results of upload back to control.
  • Control is not browser, so cannot display results
  • Controls sends results to a web page(eg. asp), that displays the results
  • Results displayed, process complete.
What arrives at the server after redirecting?:
For both upload protocols, FTP and HTTP, you get:
  • "UPLOADPROTOCOL" - Either "ftp" or "http"
  • "UPLOADREPLY" - Always some HTML containing upload results. If HTTP upload then this is what you upload script returned to the control otherwise it's a preformatted table of results from the control. If FTP upload is used then one extra field is sent.
  • "UPLOADREPLYDATA" - This is some delimited text data that you can use to make your own upload results that look more like your sites look. FTP upload reply data looks like this-
    filename|filesize|result|-|
    filename|filesize|result|-|
    filename|filesize|result|-|
    filename|filesize|result|-|
    filename|filesize|result|-|
    filename|filesize|result|-|
    filename|filesize|result
    As you can see, each row uses the "|-|" delimiter, and within each row the order is name, size and result separated by a "|" character. The result is "SUCCESS" if the file uploaded, otherwise an error message. You can use this data to make the upload results look more presentable in a higher profile web environment that uses FTP upload.
             <%
               ' In ASP, you would extract the rows from the data string like this
               dim aryResults
               aryResults = split(request.form("UPLOADREPLYDATA"),"|-|")
               ' The split function extracts each row into an element of an array
             %>
           
  • What to do about scripts taking to long to execute...:
    IF you use ASP, you might get error messages when a file takes to long to upload. Soemthing like "Script Timed out" or "Maximum Time Exceeded" will be displayed. To correct this problem refer to your IIS documentation. One way is just to set the server.ScriptTimeout variable to a long time, like half and hour or so, and this should correct the problem. In ASP it would look like this...
            <%
              Server.ScriptTimeout = (60 * 30) ' 60 seconds * 30 = half an hour,
                                               ' enough for most files
            %>
            
    Trouble-shooting   To Contents
    Other errors you might get...:
  • Permission denied - Set anonymous permissions on the directory being uploaded to.
  • Error Cracking URL - Make sure your license file is up to date and scripting is enabled if you use scripting.
  • Windows 2003 says "Bad Request" - Probably the maximum upload size is set to small in website admin.
  • ASP.NET upload stalls. Follow the code guidelines in the fileupload.aspx file from the sdk to get best ASP.NET upload results. Try not to use "back" button in browser to upload twice but put links.
  • Uploading stalls. Try to not cache the pages, do buffer the output and also expire pages immediately.


  • ERROR FAQ



    While uploading to IIS using Windows 2000/2003, the upload stalls!

    A common cause of this is that your IIS is configured to only allow uploads of a limited size. This can be adjusted in the IIS settings.
    Click here to read the official Microsoft fix, Or Try:

    1. Stop IIS
    2. Locate the file %WinDir%\System32\Inetsrv\Metabase.xml
    3. Modify the AspMaxRequestEntityAllowed value
    4. Restart IIS

    When uploading to dot net, the uploads just abort if the upload data size is greater than 4MB or 8MB.

    ASP.NET has a built in upload limit of 4 megabytes. You can increase it by editing the web.config file. This is a file placed in the root directory of your ASP.NET application, or even the directory where the upload is recieved. See http://authors.aspalliance.com/aspxtreme/aspnet/syntax/httpruntimesection.aspx for more details. If you do not do this, your upload sizes will be limited, though you can use the web.config to file to decrease the upload size if needed for just the one directory where your uploads are recieved.

    My page_load event in ASP.NET is giving all sorts of errors when trying to save the files!

    Do not use the normal ASP.NET way of saving uploaded files with the control/s. Look in the upload folder of the demo upload scripts for a file called fileupload.aspx . Use it as a template for handling uploaded files. You can try the normal way from the ASP.NET examples in your ASP.NET SDK or scripts, but they won't work as good as the example provided with this SDK.

    I use an intranet, how can I make this work?

    Get the .cab file for the ActiveX you want to use. Put it on your Intranet Server. Then get your license file and put the license file on the intranet server. Now modify the HTML parameters to reflect the location of these files on the intranet server. It will run, even via proxy, and files can be uploaded to the intranet server.

    I put the license file on the server and checked the URLLicense property, but it does'nt work and it stalls or says "Control Not Licensed!".

    This can happen if the control cannot read the license file from the server, because the license file is in a folder that does not have anonymous access enabled. You must enable anonymous access to get the license file to be downloaded by the control.

    This can also be caused when you specify an invalid path for the URLLicense parameter. Check your syntax carefully.

    I get error "Invalid verb In Request" when uploading.

    This happens when your ISAPI script handler recieving the upload is set in IIS not to recognize the "POST" verb from browsers. You must find the ISAPI script handler properties, for example "asp.dll" or "php.exe" in the web site home directory configuration settings. Adjust the settings for the ISAPI application to handle the POST verb.

    I get "Directory Access Denied" or "Access Denied" errors when uploading.

    If you are using IIS, go to the application or web sites settings and enable anonymous access for the directory security part.

    The uploads are very slow when uploading big files! Why?

    The application recieving the upload on the server has allocated a very large buffer of memory to store the big upload in. The memory is being updated very slowly as the server application recieves the files. Try to improve your Server performance by allocating enough RAM on the server, or use a specialized large upload component.





    More about "ERROR CRACKING URL"...:

    In the security settings for the browser, there is an option called "Active Scripting.". If this option is disabled in the client browser, and you use script with the controls url parameters, then you will get the "Error cracking URL" message on the client machine. This is explained to the user when it occurs as well.
    You can completely avoid this error by making sure your URL parameters are filled in and that you do not use any javaScript to get parameters into the control. Just use all <param> tags for setting the parameters.



    Any further errors you need answers on or other questions please contact the developers using the "Contact Us" form at http://www.activexobjects.com/ .



    Note that the controls are updated from time to time and you can always download the latest manuals from www.activexobjects.com.
      To Contents

    ActiveXObjects.com® Copyright© 2003 Merlix LLC / Graphix Omnimedia Group – All Rights Reserved.