Feed and upload drops using the same URL

I am using the python version for Google AppEngine. I want to be able to service and load drops from / to blobstore using the same url. For example, let's say a user can upload an image for himself. A GET request on /user/USERNAME/avatarwill return an image, while a POST request on the same URL will be set.

AFAIK, this is not possible, since each action requires a different type of handler.

Of course, I could just use two handlers, but this is kludge, and I have OCD when it comes to these things.

+3
source share
1 answer

This is not possible, and not because of the handler types - these are just convenient subclasses that do some extra work for you, but since the download must be associated with a specific URL created at runtime.

+2
source

Source: https://habr.com/ru/post/1763224/


All Articles