8000 Added support to upload files without multipart (HTML5 only) by josencv · Pull Request #602 · nervgh/angular-file-upload · GitHub
[go: up one dir, main page]

Skip to content

Added support to upload files without multipart (HTML5 only) #602

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

Merged
merged 4 commits into from
May 11, 2016
Merged

Added support to upload files without multipart (HTML5 only) #602

merged 4 commits into from
May 11, 2016

Conversation

josencv
Copy link
Collaborator
@josencv josencv commented Feb 26, 2016

For those who have problems uploading to Amazon S3 with pre-signed urls, use this:

var uploader = new FileUploader({disableMultipart: true});

And there you go.

José Ignacio and others added 2 commits February 26, 2016 12:55
@pmaoui
Copy link
pmaoui commented Apr 3, 2016

I found out an issue with Chrome (Version 50.0.2661.49 beta (64-bit)), it appears that I need to use the native File object instead of FileLikeObject. Otherwise, it sends this payload : [Object object]

For people having this issue : I had to edit this line in order to make my upload on S3 to work :

if (!item.disableMultipart) {
   ...
            }
            else {
                //old
                //sendable = item.file;
                //new
                sendable = item._file;
            }
}

@nervgh
Copy link
Owner
nervgh commented May 8, 2016

@josencv , please remove bundled files from PR (angular-file-upload & angular-file-upload.min)

@josencv
Copy link
Collaborator Author
josencv commented May 9, 2016

Should I remove the map files?

Also, should I remove them (git rm ), or should I leave the version cloned from your repo?

@nervgh
Copy link
Owner
nervgh commented May 9, 2016

You could include in you PR all files except files in /dist folder, because that folder contains few bundled files (*.js, *.map, etc). Those files contains some specific data like a version number. These data could be change when will the release.

@josencv
Copy link
Collaborator Author
josencv commented May 9, 2016

Done.

P.S: I checked out the @poupougnac bug but when I tried his solution the files uploaded to Amazon S3 got corrupted. Don't work for me so I won't add it to this PR.

@jercoh
Copy link
jercoh commented May 9, 2016

I encountered the same issue as @poupougnac.
His solution worked for me as well without corrupting the file.
I think it's worth investing this.

@josencv
Copy link
Collaborator Author
josencv commented May 9, 2016

Ok. Does anyone have time to investigate this? I don't have much time.

@poupougnac do you think it has something to do with the chrome version? I think it may be the content-type header (I sign the url with the image content type as the 'content-type' header, and then make a PUT request to the signed url with the same content type). It's just a quick theory though,

@josencv
Copy link
Collaborator Author
josencv commented May 10, 2016

Sorry, @poupougnac fix was right. I mistakenly used the original release files instead of the fixed one. Added the fix to this PR.

@nervgh
Copy link
Owner
nervgh commented May 11, 2016

@josencv thank you for your contribution ✌️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0