Function | Upload a file | ||||||||
Example |
<input
type="file"
id="content"
name="content"
accept="*"
style="display:none">
<button type="button" class="button" onclick="S10Upload('save_attachment', 'content’, this)"> Select and upload a document </button> |
||||||||
Parameters |
|
||||||||
Description |
Through S10Upload() you can enable the user to upload a local file. After the upload, the specified ABAP method is called. The content of the file is available in the attribute named in the <input> element with name= as an x-string. You can retrieve the file name in ABAP by s10actionparameter(). The file size is limited to a maximum of 16MB. Example: ABAP data: content type xstring. * save uploaded attachment method save_attachment. data: filename type string, filesize type i. filename = s10actionparameter( ). filesize = xstrlen( content ). * save content ...... endmethod. |
||||||||
Components | S10 Framework |