Skip to content

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

Merged
nervgh merged 4 commits into
nervgh:masterfrom
josencv:master
May 11, 2016
Merged

nervgh merged 4 commits into
nervgh:masterfrom
josencv:master

Conversation

@josencv

@josencv josencv commented Feb 26, 2016

Copy link
Copy Markdown
Collaborator

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

pmaoui commented Apr 3, 2016

Copy link
Copy Markdown

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

nervgh commented May 8, 2016

Copy link
Copy Markdown
Owner

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

@josencv

josencv commented May 9, 2016

Copy link
Copy Markdown
Collaborator Author

Should I remove the map files?

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

@nervgh

nervgh commented May 9, 2016

Copy link
Copy Markdown
Owner

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

josencv commented May 9, 2016 •

Copy link
Copy Markdown
Collaborator Author

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

jercoh commented May 9, 2016

Copy link
Copy Markdown

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

josencv commented May 9, 2016

Copy link
Copy Markdown
Collaborator Author

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

josencv commented May 10, 2016

Copy link
Copy Markdown
Collaborator Author

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

@nervgh

nervgh commented May 11, 2016

Copy link
Copy Markdown
Owner

@josencv thank you for your contribution ✌️

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

4 participants