danialfarid / ng-file-upload

Lightweight Angular directive to upload files with optional FileAPI shim for cross browser support
MIT License
7.87k stars 1.6k forks source link

ngf-fix-orientation causes problems when saving to server #2022

Open monetteContensive opened 6 years ago

monetteContensive commented 6 years ago

Enabling ngf-fix-orientation='true' works to display the image correctly, but sends filename="blob" to the server. This causes a problem when the server returns the image the next time the page is loaded - the images don't display and it can't read the file as an image since there is no extension.
Not using the property "ngf-fix-orientation='true' saves the files correctly, however, many images are sideways. Is there a workaround or has anyone else had this problem?

monetteContensive commented 6 years ago

Fixed issue... it had to do with ng-file-upload and I'm still not sure how this fixed it but... Upload.upload({ url: '/remoteMethodUrl......', method: 'POST', data : { imageFilename: file, } })

before I was just using upload({ Not sure why this worked for the non-rotated files, but it worked just fine... it was only when I used orientation that I needed both dependencies The libraries I am using in my project are: jquery.fileupload-jquery-ui.js jquery.fileupload-ui.js ng-file-upload-shim.js ng-file-upload.js angular-upload.min.js