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.

Security with ASP<br />

The EktronFileIO’s API<br />

Managing Images<br />

If you need to register EktronFileIO, open a command prompt and run regsvr32.<br />

By default, the EktronFileIO.dll is located in the /ewebeditpro5/samples/<br />

asp/database directory under the Web root, but it can reside anywhere on the<br />

server.<br />

Here is the code you would enter to register EktronFileIO.dll if it is in the default<br />

directory.<br />

cd \inetpub\wwwroot\ewebeditpro5\samples\asp\database<br />

regsvr32 EktronFileIO.dll<br />

Licensed owners of <strong>eWebEditPro</strong> 2.0 and higher may download EktronFileIO.dll<br />

onto their Windows Web server.<br />

The image selection page with the Browse button should validate the file<br />

extension to upload. Security should also be in the ASP page that is the form's<br />

action page.<br />

The ASP page should check the file type and only accept files that are safe, such<br />

as image files with extensions: gif, jpg, or png (see “Validext Element” on<br />

page 432). You may also want to allow document files, such as, doc and pdf<br />

extensions, or media files, such as wav, ram, and asf.<br />

You should not allow ASP or HTML files to be uploaded; a malicious person could<br />

gain control over the Web server and cause damage.<br />

For best security, only allow authorized users to access a page with <strong>eWebEditPro</strong><br />

on it. Windows Server provides a user authentication capability.<br />

Alternatively, you could use FTP, which is protected with a password. Image<br />

upload can be disabled altogether on <strong>eWebEditPro</strong> if needed.<br />

The ASP database sample supplied with <strong>eWebEditPro</strong> 2.0 and higher includes<br />

an action page, medianotification.asp, to receive uploaded files.<br />

EktronFileIO.dll is a Visual Basic 6.0 utility that allows ASP (and other platforms)<br />

to write a multipart form file upload to the server's file system. The DLL handles<br />

the following tasks:<br />

• Extracts one "uploaded file" from the supplied data stream<br />

• Saves the extracted file to a user-designated directory<br />

• Returns form field values. ASP cannot access a form field if BinaryRead is<br />

used anywhere in the page.<br />

<strong>Ektron®</strong> <strong>eWebEditPro</strong> Developer’s <strong>Reference</strong> <strong>Guide</strong>, Release 5.1, Revision 1 412

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

Saved successfully!

Ooh no, something went wrong!