source: main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/imageupload.pt @ 7109

Last change on this file since 7109 was 7106, checked in by Henrik Bettermann, 14 years ago

Second trial:

Check file name extension of original filename and compare with expected extension taken from the download_name attribute of the respective file upload viewlet. The download_name attribute is also handed over as attr parameter in chooseName and in getFileByContext.

chooseName separates attr into the base filename and the extension.

download_name = u'nice_image.abc'
File storage path: students/A/A123456/nice_image_A123456.abc

StudentFileNameChooser? itself does not require any special file extension. The extension is given by the upload and display viewlets.

(Tests will follow)

File size: 525 bytes
Line 
1<tr>
2  <td class="label">
3    <label i18n:translate="" tal:attributes="for viewlet/input_name">
4        <span tal:replace="viewlet/label">FILENAME</span>
5    </label>
6  </td>
7  <td class="field">
8    <span class="widget">
9      <img tal:attributes="src viewlet/download_name" /><br />
10      <input type="file" tal:attributes="name viewlet/input_name"/>
11      <br />
12      <span i18n:translate="">
13        Max. file size:
14        <span tal:replace="viewlet/max_upload_size">10 KB</span>
15      </span>
16    </span>
17  </td>
18</tr>
Note: See TracBrowser for help on using the repository browser.