on 2018 Nov 19 11:05 AM
Hi All,
I am using one UploadCollecition control since I need to add one file for upload to my app and in the end, i.e. when user press Approve button, only then the file upload is done.
How can I limit the number of files uploaded since I only want one file to be uploaded.
Also I tried in the Change event of UploadCollection by comparing the length and if GE 1, delete the file in frontend only but couldn't figure out.
Please Help..
Thanks
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Shubh Agarwal,
You do not need to delete any newly added item, you can simply disable the add button when the user adds the new attachment for the first time in the change event.
Also, you can have a look at the below file uploader which actually allows only one file to be uploaded.
https://ui5.sap.com/#/api/sap.ui.unified.FileUploader
BR,
Mahesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mahesh,
I am using FileUploader now, but when i upload an xlsx file, the file that is sent to backend in is_media_resource is not getting correct file. When I convert the XSTRING TO BINARY the length is not coming correct.
However if I use UploadCollection it is working fine..
Can you suggest how can i overcome that problem since i want to use fileuploader only.
Thanks
Hi ,
Below works exactly same as Upload Collection but with File Uploader.
<u:FileUploader style="Emphasized" uploadUrl="/EntitySet" id="fileUploader" name="myFileUpload" buttonText="Upload" buttonOnly="true" change="handleFileValueChange" uploadOnChange="false" uploadComplete="handleFileUploadComplete"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
34 | |
21 | |
14 | |
8 | |
5 | |
4 | |
4 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.