Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

ServletFileUpload, name = null

I upload a File with ServletFileUpload.
the fileitem is ok, but the name of the item is null.
The result of item.getFieldname is 'file1'
I want to get the filename to be able to also store he mimetype of the file.
Please, do anyone knows what I can do? :WAVE:
[290 byte] By [JochenKlein] at [2007-11-11 8:51:22]
# 1 Re: ServletFileUpload, name = null
have you tried your application with another browser?
usually what information is submitted to the server depends on the browser.
btw: you can determine the mime/filetype by reading the first 4 or 6 bytes from the submitted data. this usually contains the fileheader and thus the filetype.
graviton at 2007-11-11 22:34:14 >