blobstore

Google App Engine Use Blobkey

假如想象 提交于 2019-12-02 05:51:12
Hi there i am trying to make a servlet that allows admins to upload images and any google users to view these images, so far im working off the program available at https://developers.google.com/appengine/docs/java/blobstore/overview and when i upload an image, it serves it straight away using a very long blobKey? and stores a copy of itself in the local_db.bin What i can't find out is if there is any way to shorten the blobkeys for use? For instance i want to have a gallery which displays all the images that have been uploaded by users, however so far the only way i can get the images from

Need help processing upload form with Google App Engine Blobstore

杀马特。学长 韩版系。学妹 提交于 2019-12-02 00:29:20
问题 I'm trying to learn the blobstore API... and I'm able to successfully upload files and get them back, but I'm not having any luck trying to combine an upload form with a regular webform to be able to associated extra info with the file, such as a nickname for the file. Below is the code for a simple app I've been playing with. It's based on the sample google provides. #!/usr/bin/env python # import os import urllib from google.appengine.ext import blobstore from google.appengine.ext import

Need help processing upload form with Google App Engine Blobstore

故事扮演 提交于 2019-12-01 21:29:02
I'm trying to learn the blobstore API... and I'm able to successfully upload files and get them back, but I'm not having any luck trying to combine an upload form with a regular webform to be able to associated extra info with the file, such as a nickname for the file. Below is the code for a simple app I've been playing with. It's based on the sample google provides. #!/usr/bin/env python # import os import urllib from google.appengine.ext import blobstore from google.appengine.ext import webapp from google.appengine.ext.webapp import blobstore_handlers from google.appengine.ext.webapp import

convert servlet schema to app-engine endpoint schema

こ雲淡風輕ζ 提交于 2019-12-01 17:52:21
Would the following conversion hold for converting from Java servlet to google app-engine cloud endpoint? FROM public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { … } TO @ApiMethod(name = "save_blob_key", path = "save_blob_key" httpMethod = HttpMethod.POST) public void saveBlobKey(HttpServletRequest req) throws IOException { … } CONTEXT: I am trying to use endpoint to process blobstore callback. Ref: https://developers.google.com/appengine/docs/java/blobstore/overview#Complete_Sample_App PROBLEM: The big hickup here is that the following

convert servlet schema to app-engine endpoint schema

拈花ヽ惹草 提交于 2019-12-01 16:23:32
问题 Would the following conversion hold for converting from Java servlet to google app-engine cloud endpoint? FROM public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { … } TO @ApiMethod(name = "save_blob_key", path = "save_blob_key" httpMethod = HttpMethod.POST) public void saveBlobKey(HttpServletRequest req) throws IOException { … } CONTEXT: I am trying to use endpoint to process blobstore callback. Ref: https://developers.google.com

google app engine; upload to blobstore gives 404 error

南楼画角 提交于 2019-12-01 13:36:40
I am using GAE with Python 2.7 to make a website which can upload files with ascii data to the blobstore. The code I am using for this is pretty much the same as given in the tutorial under the section Complete sample application: https://developers.google.com/appengine/docs/python/blobstore/#Python_Complete_sample_application Most of the time, the uploading process works just fine. Sometimes, however I get the following error message: 404 Not Found The resource could not be found. No such upload session: agtkZXZ-b3BlbnZpenIiCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGICAgICA0IcLDA Has anyone come across

serving blobs from GAE blobstore in flask

て烟熏妆下的殇ゞ 提交于 2019-12-01 12:15:25
I'm trying to serve big files saved in the blobstore using Flask. For smaller files I can simply do: def download_blob(blob_key): blob_info = blobstore.get(blob_key) response = make_response(blob_info.open().read()) response.headers['Content-Type'] = blob_info.content_type response.headers['Content-Disposition'] = 'attachment; filename="%s"' % blob_info.filename return response but it fails for larger files. How can I incorporate BlobstoreDownloadHandler into my Flask app without resorting back to webapp2? If you don't care about range-requests, then you can just set a header of 'X-AppEngine

google app engine; upload to blobstore gives 404 error

十年热恋 提交于 2019-12-01 11:24:40
问题 I am using GAE with Python 2.7 to make a website which can upload files with ascii data to the blobstore. The code I am using for this is pretty much the same as given in the tutorial under the section Complete sample application: https://developers.google.com/appengine/docs/python/blobstore/#Python_Complete_sample_application Most of the time, the uploading process works just fine. Sometimes, however I get the following error message: 404 Not Found The resource could not be found. No such

serving blobs from GAE blobstore in flask

谁说胖子不能爱 提交于 2019-12-01 11:08:40
问题 I'm trying to serve big files saved in the blobstore using Flask. For smaller files I can simply do: def download_blob(blob_key): blob_info = blobstore.get(blob_key) response = make_response(blob_info.open().read()) response.headers['Content-Type'] = blob_info.content_type response.headers['Content-Disposition'] = 'attachment; filename="%s"' % blob_info.filename return response but it fails for larger files. How can I incorporate BlobstoreDownloadHandler into my Flask app without resorting

Stop Blob URL from expiring

半城伤御伤魂 提交于 2019-12-01 11:04:14
I am uploading images to the blob store. I have copied the example from here . The only problem I encounter is: If I load the page with the form, and not immediately submit the image. The URL can expire and when I do try and load the image I get an error page. How can I check to see if the URL has expired and refresh the URL without the user knowing? It seems the work around is getting the Blob URL when the user submits the form. This way you know that the URL can't expire. Using JQuery: $.get("/blobUrl", function(data){ $("#changeProfilePictureForm").attr('action', data); $("