views:

63

answers:

2

Is it possible to upload blob to blobstore using remote API (not the standard upload scheme)?

I want to write backup/restore script for my application and blobstore is the only thing that doesn't work.

+1  A: 

Blobstore access over Remote API was added three days ago:

  • Remote API now supports the Blobstore API. (Changelog)

remote_api works at the lowest level of the datastore, so once you've set up the stub, you don't have to worry about the fact that you're operating on a remote datastore: With a few caveats, it works exactly the same as if you were accessing the datastore directly. (App Engine Help)

leoluk
But there is no way to upload object to blobstore from the code.
Sergei Stolyarov
I mean I can only read blobs from blobstore, and can't put them there.
Sergei Stolyarov
I can't try it out, I have no access to the Blobstore.
leoluk
Correct, just like you can't write to the blobstore in program code that's running on the production servers; all data going in to blobstore needs to be posted to a created upload URL.
Wooble
You can use remote_api to get an upload URL from the blobstore, then post your file to it. That'll require a bit of custom code for an upload handler. We'd like to add support for this to remote_api, but it's not there quite yet.
Nick Johnson
+1  A: 

I once solved the problem of programmatically uploading to the blobstore and wrote a short tutorial/explanation for it on my blog. Hope it's useful: http://swizec.com/blog/programatically-uploading-to-blobstore-in-python/swizec/1423

Swizec Teller