The Dyalog InputFile
control is deprecated. Use Input'file'
instread, like in this example. If a file is uploaded, the data linked to the name of the input control is a 2 element vector of vectors. The first vector is the file name, the second vector is an integer vector (datatype 83) of the uploaded file's data
:Class InputFileSimple : MiPageSample
⍝
⍝
∇ Compose;out;fname;fdata;frm
:Access Public
Add MarkdownFollows
⍝
⍝
⍝
out←'output'Add _.div
:If _Request.isPost ⍝
:AndIf ×≢Get'ipfl'
⍝
⍝
⍝
⍝
⍝
(fname fdata)←Get'ipfl'
out.Add _.strong fname,' received with ',(⍕⍴fdata),' bytes and a checksum of ',⍕(255|+)/⎕ucs fdata
out.Add¨2⍴_.br
:EndIf
frm←Add _.Form ⍝
'ipfl'frm.Add _.Input'file' 'Select a file to upload: '
frm.Add _.br
'submit'frm.Add _.Input'submit' 'Submit'
⍝
⍝
⍝
∇
:EndClass