on 10-03-2012 3:56 PM
Hi Experts,
I used the FileUpload UI element to upload a file. Now I have a requirement to restrict the file size to 20MB when a file is selected.
Could anyone help me how do i get the filesize.
Thanks in advance...
Best Regards,
Govardhan D.
Hi,
As explained above, you can get the size of file after upload. If you want to restrict uploading file larger than 20MB, set the parameter icm/HTTP/max_request_size_KB
http://help.sap.com/saphelp_nw04s/helpdata/en/46/e4de6dda9d537ce10000000a1553f6/content.htm
But you should be careful to use the parameter as it is global and it reflects for all applications.
Hope this helps u.,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Govardhan,
You can get the file size that you upload using file upload UI
wd_context->get_attribute( exporting name = 'FILE' importing value = content ).
what ever the content ur getting to know the size write this line.
data size type i.
size = xstrlen( content ). "Pass the content ur receiving when u upload file.
This size u'll get in bytes convert it into MB or any u want.
Regards
Madhukiran M.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.