15.08.2013 Views

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

Ektron® eWebEditPro Developer's Reference Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Managing Images<br />

The FILE input item contains the name and location of the local file to upload. The<br />

EktronFileIO DLL reads this information from the form submittal and uploads from<br />

the source location. For this sample, we hard code the destination location.<br />

This is the full page for asking the user what file to upload. Next, we create the<br />

ASP page that is called when a post event activates the upload mechanism.<br />

Step 3: Creating an ASP Page to Activate the Posted Upload<br />

The ASP page created above calls for a second page to be loaded when the form<br />

we defined is posted. The second page contains ASP code that interacts with the<br />

EktronFileIO DLL object and displays any feedback we need.<br />

To create the second page, begin by creating a basic ASP page. Save this page<br />

as performupload.asp in the same directory as the page created above. (This is<br />

the same name that we placed in the action attribute of the form element above.)<br />

<br />

<br />

<br />

Page That Activates Upload<br />

<br />

<br />

Uploaded File<br />

<br />

<br />

At this point, test the page to ensure that it loads when a post occurs. (If this<br />

mechanism does not work, it does not matter how much ASP you place into your<br />

pages.) To test it, load the first page in a browser. When you press the "Upload"<br />

button, the second page with a gray background and the "Uploaded File" header<br />

line should load.<br />

Now, we’ll add the ASP that activates the upload with the EktronFileIO DLL.<br />

<br />

<br />

<br />

Page That Activates Upload<br />

<br />

<br />

Uploaded File<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!