AppEngine 的标准 API 假定文件是从 HTML 表单上传的。 我正在尝试通过可由非 Html 客户端(Flash、iPhone 等)调用的 REST API 方法将文件发布到 blobstore
我尝试运行的代码:
# Get the blobstore upload url
upload_url = blobstore.create_upload_url("/activities/upload_finished");
# Make sync call to the blobstore url to post our image
result = urlfetch.fetch(url=upload_url,
payload=request.FILES,
method=urlfetch.POST,
headers={'Content-Type': 'multipart/form-data'})
我收到以下错误:
ValueError: Invalid boundary in
有什么想法吗?
有没有人试过不通过网络表单向 blobstore 发帖?
multipart form: ''
最佳答案
App Engine (version 1.4.3) allows you to directly write data to the blobstore .
您不再需要使用上传 url 方法。
关于google-app-engine - 直接将数据放入 AppEngine 的 Blobstore,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2149198/