简体   繁体   中英

How to obtain file name from a GAE java blobstore upload

To store file in GAE blobstore, I will create a jsp to upload

<html>
<body>
<form action="<%= blobstoreService.createUploadUrl("/upload") %>" method="post"     enctype="multipart/form-data">
    <input type="file" name="myFile"/> 
    <input type="file" name="myFile1"/>
    <input type="file" name="myFile2"/>
    <input type="submit" value = "Submit"/>
</form>
</body>
</html>

Now, what is the normal way to link a file name with this

blobkey=blobs.get("myFile");  

I want to map a filename with this blobkey, maybe in datastore for future use, so how to I upload a filename to let my servlet use, or how do I derive the file name (path can be omitted) from this blobkey?

看起来它仍然使用getParameter(“ filename”)来了解更多信息

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM