source: main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/fileupload.pt @ 7106

Last change on this file since 7106 was 7106, checked in by Henrik Bettermann, 13 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: 622 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      <a tal:attributes="href viewlet/download_name"
10         tal:content="viewlet/download_name"
11         target="image">
12        LINK
13      </a>
14      <br />
15      <input type="file" tal:attributes="name viewlet/input_name"/>
16      <br />
17      <span i18n:translate="">
18        Max. file size:
19        <span tal:replace="viewlet/max_upload_size">10 KB</span>
20      </span>
21    </span>
22  </td>
23</tr>
Note: See TracBrowser for help on using the repository browser.