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 6196667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:41:01+00:00 2026-05-24T03:41:01+00:00

I am going to use Google app engine Blobstore to store my uploaded files.

  • 0

I am going to use Google app engine Blobstore to store my uploaded files. File type can be anything (.txt,.pdf,.docx etc)
I have written following servlet to download stored files in Google app engine Blobstore.

public class Serve extends HttpServlet { 

private BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();

public void doGet(HttpServletRequest req, HttpServletResponse res)
throws IOException {

    BlobKey blobKey = new BlobKey(req.getParameter("blob-key"));
    blobstoreService.serve(blobKey, res);      

}

}

But every time I request a file by giving a url as below,
http://127.0.0.1:8888/serve?blob-key=DEHQ3U_2wtUdEL7XPI434Q
file is downloaded nicely. But no extension for file. And name of the file is always ‘serve’
What should I do to download the uploaded file with the original name of the file?
Thanks,

  • 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-05-24T03:41:03+00:00Added an answer on May 24, 2026 at 3:41 am

    I know python has a send_as option that automatically sets the filename for the response, but I think in Java you will have to add a Content-Disposition header to the response like:

    Content-Disposition: attachment; filename=your-file.docx; 
    

    The BlobInfo for your blob keeps the original filename and you can fetch it via getFilename

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

Sidebar

Related Questions

Possible Duplicate: Choosing Java vs Python on Google App Engine We are going to
I want to provide rss feed under google app engine/python. I've tried to use
I'm developing a iPhone application that will use a Google App Engine backend and
I'm working with Spring MVC on google app engine and even though I've gotten
I'm on the process of designing a web application based on Google App Engine
I've just started playing with Google App Engine using php via Quercus. I'm not
I am creating an Android app that will download and cache PDF files (the
I just started working on a project that will run on google app engine
I'm using App Engine python to host an application and would love to use
I use Sinatra modular style, i don't know what going bad. I serach google

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.