JS FileReader not working in safari it is working fine in chrome

后端 未结 3 741
忘掉有多难
忘掉有多难 2021-01-16 10:34

I have created function to display image please help on this if you have any alternative solution.

admin.previewImage = function(input,selector) {
    if (i         


        
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-16 11:21

    The file reader is only available in safari 6.0 and unfortunately we cannot use it as it is.
    U can use an external plugin to show the preview of image or check the availability of filereader api in your browser if not found bypass it with any other issue handling strategies

    if(window.FileReader) { //do this } else { //the browser doesn't support the FileReader Object, so do this }

提交回复
热议问题