5👍
✅
Yes, I think you are missing something very basic here. You don’t have access to the file system on Google App Engine so the os.makedirs()
won’t work. If you want to upload images (or files in general) you have to store them in Blobstore or in Google Cloud Storage. Before doing anything else I would suggest you to go through the Blobstore Python API Overview where you can see the fully working example on how to upload files.
Further if you have images uploaded as blobs you will be able to get the image serving URL through get_serving_url()
by providing the blob_key
. With this URL you can request any size for a particular image or even crop it server side without any extra effort.
Source:stackexchange.com