-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.authtype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
A policy (and its associated signature) allows a web application to create a form that allows user agents to directly upload to Google Cloud Storage. This is a pretty useful feature and it would be great if this client library could make that easier.
A rough idea:
storage = google.cloud.storage.Client()
policy = storage.policy(
bucket='my-bucket',
acl='bucket-owner-read',
succes_action_redirection=url_for('upload_success'),
content_type='image/jpeg',
content_length_range=(0, 1024*10))
encoded = policy.encoded
signature = policy.signature
for field_name, field_value in policy:
# HTML field names and valueskoendewit and jeffgodwyll
Metadata
Metadata
Assignees
Labels
api: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.authtype: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.