Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8573691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:18:32+00:00 2026-06-11T19:18:32+00:00

From the documentation of the App Engine Blobstore, there should be a BlobInfo entry

  • 0

From the documentation of the App Engine Blobstore, there should be a BlobInfo entry in the DataStore for each entry in the BlobStore. Then why is my blobInfo null in the code below?

Note:

  • If I remove the BlobInfo code, the servlet returns the resource as it should (but without a filename)
  • For brevity, I removed exception and parameter handling

I would be very grateful for your help.

public class GetResourceServlet extends HttpServlet {
    private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();
    private BlobInfoFactory infoFactory = new BlobInfoFactory();

    public void doGet (  HttpServletRequest request, HttpServletResponse response)
             throws ServletException, IOException {

       String blobKeyStr = request.getParameter("blob-key");
       BlobKey blobKey = new BlobKey(blobKeyStr);

       BlobInfo info = infoFactory.loadBlobInfo(blobKey); // returns null !?
       String fname = info.getFilename();
       response.addHeader("content-disposition", "attachment; filename=" + fname);

       blobstoreService.serve(blobKey, response);
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:18:34+00:00Added an answer on June 11, 2026 at 7:18 pm

    Finally, I found the problem. The key string (blobKeyStr) contained a newline character at the end. The nasty thing is that you don’t notice it in logging. Adding a blobKeyStr = blobKeyStr.trim() solved the problem

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading about the Blobstore in Google App Engine. The code below is
The Google App Engine Datastore allows each entity to have a parent entity ,
I've read this paragraph from the App Engine documentation a dozen times and still
According documentation Google App Engine could send mail but from restricted list of addresses
I'm looking the documentation about publishing the message to wall from Facebook app http://developers.facebook.com/docs/reference/dialogs/feed/
I'm sending an email from my ASP.NET MVC app using the Spark View Engine
I am doing image uploads as outlined in the documentation for the App Engine
I don't understand how google app engine for python's Model.get_or_insert(key_name, **kwds) method works. From
I am practicing sending emails with Google App Engine with Python. This code checks
I'm trying to upload some data to my App Engine datastore using the bulkuploader.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.