UploadBlobServlet
Stay organized with collections
Save and categorize content based on your preferences.
- java.lang.Object
-
- HttpServlet
-
- com.google.appengine.api.blobstore.dev.UploadBlobServlet
-
public final class UploadBlobServlet
extends HttpServlet
UploadBlobServlet
handles blob uploads in the development
server. The stub implementation of
BlobstoreService.createUploadUrl(java.lang.String)
returns URLs that are mapped to this servlet.
Its primary responsibility is parsing multipart/form-data or
multipart/mixed requests made by web browsers. To minimize
dependencies in the SDK, it does using the MimeMultipart class
included with JavaMail.
After the files are extracted from the multipart request body,
they are assigned BlobKey
values and are committed to local
storage. The multipart body parts are then replaced with
message/external-body parts that specify the BlobKey
as
additional parameters in the Content-type header.
-
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
UploadBlobServlet
public UploadBlobServlet()
-
Method Detail
-
init
public void init()
throws ServletException
- Throws:
ServletException
-
doPost
public void doPost(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException,
java.io.IOException
- Throws:
ServletException
java.io.IOException
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["`UploadBlobServlet` is a class within the development server that manages blob uploads, utilizing URLs generated by `BlobstoreService.createUploadUrl(java.lang.String)`."],["This servlet processes `multipart/form-data` or `multipart/mixed` requests from web browsers, relying on the MimeMultipart class for parsing."],["After extracting files from multipart requests, it assigns `BlobKey` values and stores them locally, then replacing multipart parts with `message/external-body` parts that include the `BlobKey` in the `Content-type` header."],["The class includes methods such as `doPost`, which handles HTTP POST requests, and `init`, which initializes the servlet, potentially throwing a `ServletException`."]]],[]]