Details
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.encodedsignature=policy.signatureforfield_name, field_valueinpolicy:
# HTML field names and values
Details
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: