Skip to content
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

Merge file upload and acl requests for Gcloud. #37

Merged
merged 2 commits into from
May 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
0.3.0 (unreleased)
==================

- Nothing changed yet.
- Merge file upload and acl update requests with the Google Cloud backend. (#36)


0.2.0 (2018-11-23)
Expand Down
4 changes: 1 addition & 3 deletions pyramid_storage/gcloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,6 @@ def save_file(self, file, filename, folder=None, randomize=False,

blob.cache_control = self.cache_control
file.seek(0)
blob.upload_from_file(file, rewind=True, content_type=content_type)

acl = acl or self.acl
blob.acl.save_predefined(acl)
blob.upload_from_file(file, rewind=True, content_type=content_type, predefined_acl=acl)
return filename