jsr340-experts@servlet-spec.java.net

[jsr340-experts] part.write() return value

From: Ted Goddard <ted.goddard_at_icesoft.com>
Date: Fri, 15 Jul 2011 14:46:02 -0600

On javax.servlet.http.Part we currently have the method

    void write(java.lang.String fileName)

but it's not easy for application code to get to the written file
because MultipartConfig.location can be modified at deployment time.

Perhaps the easiest thing would be to have the written File returned:

    java.io.File write(java.lang.String fileName)

or add Part.getFile() (which could return null if the file has not been
written -- the interface does seem to allow multipart uploads that are not
stored immediately on the file system; do any implementations work this way?)

Cheers,
Ted.