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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:21:18+00:00 2026-06-01T10:21:18+00:00

I am tring a webapplication in GWT which uploads a file >1 MB and

  • 0

I am tring a webapplication in GWT which uploads a file >1 MB and type doc and pdf.
I am using BlobStore.
Actually i have to store this file in the repository.Session of this repository is already created and is working fine.

Code

  // Get The URL
  public void onClick(ClickEvent event) {
          System.out.println("blob" +blobServices);
        blobServices
            .getBlobStoreUploadUrl(callback) ;
      }
    });

The above RPC call is working fine i am able get the URL.
Now i have to use this URL with servlet which is used to upload a file.

   AsyncCallback callback = new AsyncCallback() {

    public void onFailure(Throwable caught) {
        // TODO Auto-generated method stub
        caught.printStackTrace();
    }

    public void onSuccess(Object result) {
    String tmp = result.toString();
        uploadForm.setAction(tmp);

        // Submit the form to complete the upload
        uploadForm.submit();
        uploadForm.reset();
    }
};

On server Side

 public class UploadServiceImpl extends HttpServlet {

       BlobstoreService blobstoreService = BlobstoreServiceFactory.getBlobstoreService();

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

    Map<String, BlobKey> blobs = blobstoreService.getUploadedBlobs(req);
    BlobKey blobKey = blobs.get("upload");
  }

 }

I dont know what to do after this. can any one tell me the code or the link to understand this part.
I want the size of the file and the content of the file.
the most Important is file is of type .doc and .pdf not image.

  • 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-01T10:21:19+00:00Added an answer on June 1, 2026 at 10:21 am

    Since you can’t get the file name and type during the blobstore call, what I do is capture the file name on the client form and store it in a hidden field. When the user uses the uploadform you can grab the file name from whatever chooser you’re using. Then when you post to your UploadServiceImpl you can get the file name from

    req.getParameter(hiddenfieldname).

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

Sidebar

Related Questions

I have this webapplication tool which queries over data and shows it in a
I have a JSF 2.0 Webapplication into which I d'like to include TinyMCE 3.5.
I have written a game in PlayN, which has to communicate with a JavaEE-Server
I've generated a new Web Application project using GWT 2.0.4. I replace the onModuleLoad()
I am trying to implement jqgrid v3.7 in my webapplication created using cakephp v1.3.
My company develops a web application (in Java using GWT) that employs the Google
I have developed web applications using JSF (myfaces components). But in these days of
This may be an incredibly stupid question, but I have a web application that
I am trying to deploy a webapplication using maven cargo plugin into tomcat server.
I am trying to deploy and run my webapplication using maven and its tomcat

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.