GithubHelp home page GithubHelp logo

Comments (20)

colddiver avatar colddiver commented on July 23, 2024

Tried debugging the issue... The offending statement is this:
var formData = new FormData(that.form[0]); (around line 150)

The solution appears to be something like this:
http://stackoverflow.com/questions/13123537/formdata-of-existing-form-fails-in-ie10-by-triggering-via-js

I fiddled around but did not manage to fix the issue yet...

from croppic.

colddiver avatar colddiver commented on July 23, 2024

Another possible option to fix this:
http://jonhiggins.co.uk/words/formdata-ie10/

from croppic.

martinlingstuyl avatar martinlingstuyl commented on July 23, 2024

Following the link: http://stackoverflow.com/questions/13123537/formdata-of-existing-form-fails-in-ie10-by-triggering-via-js

Changing the line into this makes it work in my project:

var formData = new FormData();
var input = that.form.find("input[type=file]")[0];
for (var i = 0; i < input.files.length; i++) {
formData.append('file', input.files[i]);
}

And since we always upload one photo at a time, this works as well:
var formData = new FormData();
formData.append('file', that.form.find("input[type=file]")[0].files[0]);

I'll create a pull request for it

from croppic.

colddiver avatar colddiver commented on July 23, 2024

Awesome martinlingstuyl - it works indeed!

from croppic.

Angelger83 avatar Angelger83 commented on July 23, 2024

Hi martinlingstuyl I add the piece of the code that you provide, but I get the message "something went wrong" while trying to upload the image in IE10, do you know what happens?

from croppic.

tristar500 avatar tristar500 commented on July 23, 2024

@martinlingstuyl, Unfortunately, this fix also breaks my (probably very hacky) CSRF _token fix for Laravel4.

<script>
    var token = '{{csrf_token()}}';

    var cropperHeader = new Croppic('headshot',
    {
      imgEyecandy: false,
      cropUrl:'portrait/crop',
      cropData:{'_token':token},
      outputUrlId: 'headshot'
    });

   $(function () {
     var token = '{{Form::token()}}';
     $('.headshot_imgUploadForm').append(token);
   });
</script>

from croppic.

ahm-3d avatar ahm-3d commented on July 23, 2024

i am getting the same problem as Angelger83.
i have replaced:

var formData = new FormData(that.form[0]);

with the code below which was partly extracted from http://jonhiggins.co.uk/words/formdata-ie10/ and martinlingstuyl solution.

try {
    // other modern browsers
    var formData = new FormData(that.form[0]);
} catch(e) {
    // IE10 MUST have all form items appended as individual form key / value pairs
    var formData = new FormData();
    formData.append('file', that.form.find("input[type=file]")[0].files[0]);
}

any ideas where i am going wrong?

from croppic.

sconsult avatar sconsult commented on July 23, 2024

i could not replicate the problem in my IE10 with rollups. is this still an issue ?

from croppic.

sconsult avatar sconsult commented on July 23, 2024

No response received, if it still occurs, please reopen a new Issue

from croppic.

iansim avatar iansim commented on July 23, 2024

Hi @sconsult ,
This issue still there,
I think this is IE 10's Cross domain issue when upload with ajax. for IE 11, they have fixed it.
I use below way to overcome this issue.
Just detect the browser version...

    isAjaxUploadSupported: function () {
        var isIE10 = false;
        /*@cc_on
            if (/^10/.test(@_jscript_version)) {
                isIE10 = true;
            }
        @*/
        if(isIE10){
            return false;
        }

from croppic.

ahm-3d avatar ahm-3d commented on July 23, 2024

i have updated the latest croppic version. ie9 and ie11 works great, however ie10 still errors with "SCRIPT5: access is denied"

@sconsult , where do i need to add the code which you have suggested to get ie10 to work

from croppic.

shymkovayu avatar shymkovayu commented on July 23, 2024

Hello,

I'm also having this issue in IE10. I tried every solution from this topic. I don't get the acces error with solutions above, but the image doesn't upload also.

from croppic.

sconsult avatar sconsult commented on July 23, 2024

Hi @shenyangcn @ahm-3d

Thank you for the input, Can you give me the Exact IE10 version you are using? i cant replicate the Issue.

Thank you

Mat

@shymkovayu
Your problem most likely has nothing to do with this issue. If you want to have support, you need to post at least enviroment you are using, browser console output or error message your receiving.
if you use IE10 and you are using the first example on croppic, you problem is that processInline is not supported, the solution is simple..don't use processInline ;-)
You would have seen this when you open your browser console ;-)

from croppic.

iansim avatar iansim commented on July 23, 2024

Hi @sconsult ,

Please find IE version from below screen shot,
But I think it is much related to the image itself, not all the image have this issue, only those images cross domain will encounter this.

You may try with http://i.imgur.com/3tU4Vig.jpg for test. A higher IE version which downgrade to IE 10(with developer tool)also will not get the result.
I get the image from below link,
http://stackoverflow.com/questions/24087757/three-js-and-loading-a-cross-domain-image

I think this is a IE 10 issue,
But to make it work either by upload the image with base64 encoded, or by iframe should be good.
screen shot 2015-08-28 at 12 04 11 pm

from croppic.

sconsult avatar sconsult commented on July 23, 2024

hi @shenyangcn

Can you please repost the console output, i can only see half of it. Are you using the latest version ?
Based on your readable output in the console, i can't make sense of what should be wrong at line 547 or 317.

Mat

from croppic.

iansim avatar iansim commented on July 23, 2024

Hi @sconsult ,

I'm using the latest code from github,
And I also tried from croppic website.
Below image is captured from another PC with IE 10.

20150829222841

from croppic.

shymkovayu avatar shymkovayu commented on July 23, 2024

Hi @sconsult ,

I guess I described the situation a little bit incorrect :)

I get the SCRIPT5: Access denied croppic.js line 220 character 6.
IE version 10.0.9200.16521

I meant that when I'm trying solutions from this topic the access error from console disappears, but the image still doesn't upload.

I also tried to set processInline to false, nothing changed.

from croppic.

sconsult avatar sconsult commented on July 23, 2024

Hi all.

I was finally able to replicate the issue on the IE10. The problem has been resolved with the update from today.
Please reopen a new ticket if another IE10 issue persists.

Cheers

Mat

from croppic.

KarthikRocker avatar KarthikRocker commented on July 23, 2024

http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/ie10-script5-access-is-denied/e87bdb30-7f2a-4510-bfa3-a22b995f777b?auth=1

from croppic.

sconsult avatar sconsult commented on July 23, 2024

Hi @KarthikRocker

Not sure what your comment should outline. The Problem your referring with your link has been addressed. If you are experiencing an issue, please open a new ticket.

Mat

from croppic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.