I'm uploading a blob file from HTML form to MySQL database using JSP. I need to insert the filename into DB. I know that the filename is stored in the Content-Disposition header, how could I get that? Thanks in advance!
相关问题
- Angular RxJS mergeMap types
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
If you uploaded the file using JavaEE 6 with
HttpServletRequest.getPart
:See Part.
As @Marc mentioned I did not treat URL encoding. (He also made the quotes around the filename optional.)
Not checked, but HTTP encoding for headers should be the default ISO-8859-1.