Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Maybe it's already public?
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyjbowers committed Sep 28, 2017
1 parent 60bf155 commit 082d0cd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions twilio_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,8 @@ def persist_file(filename, uploaded_file):
'''
client = storage.Client()
bucket = client.get_bucket('int.nyt.com')
local_filename = filename.split('/')[-1]
remote_path = '%s/%s' % ('apps/shazongress', local_filename)
blob = bucket.blob(remote_path)
blob = bucket.blob(filename)
blob.upload_from_string(uploaded_file.read(), content_type="image/jpeg")
blob.make_public()
blob.upload_from_string(uploaded_file.read(), content_type="image/png")
return blob.public_url.replace('apps%2Fshazongress%2F', 'apps/shazongress/')

if __name__ == '__main__':
Expand Down

0 comments on commit 082d0cd

Please sign in to comment.