I have a GAE application with a database of users.
When one of the user tries to download, say, file myapplication.appspot.com/somefile.jpg
, I would:
- check on the GAE database whether he is allowed to
- if he is allowed, redirect him to a cloud storage bucket of mine from where he can download
somefile.jpg
- if he is not allowed, return him a 404 error code, and do some magic so that directly trying to download
somefile.jpg
from the cloud storage bucket does not complete.
Now what’s unclear to me is how to control access to somefile.jpg
. How can I restrict the download to this scope of users?
PS: using something else than Google Storage is not an option (for those of you guys who thought about blobstore).