Comments (20)
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.
Another possible option to fix this:
http://jonhiggins.co.uk/words/formdata-ie10/
from croppic.
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.
Awesome martinlingstuyl - it works indeed!
from croppic.
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.
@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.
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.
i could not replicate the problem in my IE10 with rollups. is this still an issue ?
from croppic.
No response received, if it still occurs, please reopen a new Issue
from croppic.
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.
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.
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.
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.
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.
from croppic.
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.
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.
from croppic.
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.
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.
from croppic.
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)
- Add feature: Drag n Drop
- the site is no more accessible for documentation HOT 1
- Croppic does not generate images HOT 2
- jQuery 3 compatibility issue HOT 3
- Multiple uploading
- Multiple Croppics
- Croppic as App
- Parameter issues ! HOT 1
- Download PHP Example File on your website is not working. HOT 5
- Crop high resolution image and still get a high resolution crop HOT 1
- no works
- Windows 10 Tablet, All Browsers Not Working
- zoom hide
- Can't upload a picture more than 9mo
- Controls missing
- Can`t upload File; no write Access HOT 2
- I need help with trying to save in the original file name.
- Is there or will there be a... No jQuery Version?
- I have 2 question, help please
- Upload Button HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from croppic.