valor-software / ng2-file-upload

Easy to use Angular components for files upload
http://valor-software.github.io/ng2-file-upload/
MIT License
1.91k stars 662 forks source link

Uploading files to Google Cloud Storage #566

Open daslicht opened 7 years ago

daslicht commented 7 years ago

Hi, is there a way to upload files to google cloud storage using ng2-upload? please?

~ Marc

MrTerrorbyte commented 7 years ago

In ng2-file-upload/file-item.class.js, I had to change the POST request to a PUT request. For some reason google storage doesn't like POST I think..

For Uploader options, I also used disableMultiPart: true.

Then I used the google api to make a signed_url and used ng2-file-upload's upload() on this url.

adrianfaciu commented 6 years ago

@MrTerrorbyte if interested you can add a PR with your changes so and we can look at merging this into the package.