-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error : Not a valid marker at offset 684, found: 140 <-- what?? #1113
Comments
That's just a warning for an error in exif info of the file. That's shouldn't cause any problem. Only if the file has orientation exif info it means that it cannot rotate the file to fix the orientation |
Leave this open I will try to make it a warning or suppress this |
This error is preventing multiple file uploads, when I drag a group of photos onto the drop zone, just FYI |
Fixed at version 10.0.0 By default ngf-fix-orientation is off so you need to enable it. Also that error should not prevent upload anymore. |
Hi Danialfarid. When uploading files without EXIF data and setting fix rotate to true you get this error (v10.0.2). Would it be better to return null when checking the EXIF data rather than throwing an error? |
What error do you see? @Johnnyrook777 |
Two examples: Seem you get this error if the EXIF data isn't present, in which case you should simply not rotate the image. The orientation method currently rejects the promise if a string is found via the EXIF, I'm thinking it might be better to resolve a null. It may actually be better to check if the result is a number. Something like the code below Sorry, I'm not super familiar with the library, so I'm not sure what the implications may be for this change upload.orientation = function (file) {
if (file.$ngfOrientation != null) {
return upload.emptyPromise(file.$ngfOrientation);
}
var defer = $q.defer();
var fileReader = new FileReader();
fileReader.onload = function (e) {
var orientation;
try {
orientation = findEXIFinJPEG(e.target.result);
} catch (e) {
defer.reject(e);
return;
}
// Proposed solution 1 - Check for a number result
if (angular.isNumber(orientation)) {
file.$ngfOrientation = orientation;
defer.resolve(orientation);
}
else {
defer.resolve();
}
// Proposed solution 2
if (angular.isString(orientation)) {
// Johnnyrook Fix,
defer.resolve();
// Original
//defer.reject(orientation);
} else {
file.$ngfOrientation = orientation;
defer.resolve(orientation);
}
};
fileReader.onerror = function (e) {
defer.reject(e);
};
fileReader.readAsArrayBuffer(file);
return defer.promise;
}; |
Can you attach the images that produce that error here? |
Pretty sure it will occur with any image that doens't have the EXIF properites. Also, for reference. This is my button HTML
|
Alright will be fixed in the next version. For now you can just ignore the error since it doesn't affect the functionality. |
Thanks @danialfarid. Yeah, I've got a quick workaround in our production version. Thanks mate. Much appreciated |
It's been a while since I laughed reading some github comments, thanks for that picture @Johnnyrook777 |
Hahaha, thanks @carlosfunk I actually found the issue when I uploaded that pic to our testing system .... Its now my goto picture for all testing and/or profile pictures ;) |
Fixed at version 10.0.3 |
upload image situation i see this error => Not a valid marker at offset 684, found: 140
what is it??
The text was updated successfully, but these errors were encountered: