1

I am uploading image in my webpage. when i select image, images shows in a div before upload. it is working in all browser but not working in safari.

var reader = new FileReader();
reader.onload = fimageIsLoaded;
reader.readAsDataURL(this.files[0]);

FileReader function is not working. in place of this i used.

var tmppath = URL.createObjectURL(event.target.files[0]); 

for get tempath of file but it is also not working. error is coming can not find variable URL. Please help to solve this.

Martin
  • 22,212
  • 11
  • 70
  • 132

1 Answers1

0

Safari on windows not support FileReader. you can get more information from here:

What to use instead of FileReader for Safari?

if you want to have fielReader, i think the best way is using flash when your client browser is Safari.

Community
  • 1
  • 1
Omidam81
  • 1,887
  • 12
  • 20