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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example 2: File Size Restriction, No Saving to Database<br />

Managing Images<br />

<br />

<br />

<br />

Image File<br />

Image File<br />

<br />

<br />

1000<br />

gif,jpg,png,jpeg,jif<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

0<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

In this example, the user inserts an image from a remote directory. The Web<br />

master sets a maximum image size of 100 Kb. If the user tries to insert an image<br />

larger than 100 Kb, an error message appears and the insertion is terminated.<br />

NOTE You can also use the mediafiles feature of the configuration data to limit the file<br />

types that users can insert, using the validext attribute. You implement this<br />

restriction in the same way you implement maximum file size.<br />

To incorporate this version of image selection, follow these steps.<br />

1. Within the ewebeditpro5 directory, create an .htm file, for example,<br />

imageselect_100kb.htm.<br />

2. Within the document’s head tags, include the ewbeditpro.js file.<br />

<br />

<br />

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

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

Saved successfully!

Ooh no, something went wrong!