Click here to Skip to main content
15,664,182 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
I am working on a project where I need to show preview of image before croping.i am using jquery.Jcrop.js v0.9.12 plugin and it works great in all the browsers. but in Safari preview image does not display. I found that in lower version of Safari FileReader is not supported. i have safari 5.1.7. here is the code :
var e = {}; = window.FileReader && function (e, t, n) {
    var r = new FileReader;
    r.onload = function (n) {
        var r = new Image;
        r.onload = function (n) {
            if (!, r)) {
                e.setImage(r.src, t.afterPick)
        r.onerror = function (n) {
  , null)

        r.src =

Do we have any other way to read file in lower version of Safari for window?


Safari 5.x does not support FileReader. It is supported form version 7.1 only...
Share this answer
Raje_ 12-Feb-15 10:39am    
Thank you for reply. yes I know it does not support FileReader. do we have any alternative for this?
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900