cancel
Showing results for 
Search instead for 
Did you mean: 

Read File using fileuploader

yoppie_ariesthio
Participant

Dear all,

I have fileuploader and button that will triggered my file reader script.

i want to read the file after click the button 'Upload' without upload the file. Just to read the content

How to do that? I tried with this.getView().byId('fileuploaderId').files[0] but i got an error...

Thanks

Best Regards

Yoppie A.

Accepted Solutions (1)

Accepted Solutions (1)

Hi Yoppie,
try something like that
JS Bin - Collaborative JavaScript Debugging

Answers (3)

Answers (3)

SergioG_TX
Active Contributor
0 Kudos

Yoppie,

typically the file may not be easily readable directly on the client side due to browser security restrictions, etc... if you do use the file uploader control from sapui5, you need to post the content of the file to an xsjs service where you can read it and respond to the client side function with its content. is this what you are trying to avoid or is this ok to do for you?

hope this helps

NagaPrakashT
Contributor
0 Kudos
junwu
Active Contributor
0 Kudos

google js read local file