You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to also have the field name passed to the :store function, like so:
(defn-parse-file-item"Parse a FileItemStream into a key-value pair. If the request is a file the supplied store function is used to save it."
[^FileItemStream item store encoding]
[(.getFieldName item)
(if (.isFormField item)
(Streams/asString (.openStream item) encoding)
(store {:filename (.getName item)
:field (.getFieldName item)
:content-type (.getContentType item)
:stream (.openStream item)}))])
This way different logic can be applied depending on the field.
Thanks
The text was updated successfully, but these errors were encountered:
So I have two (very large) files being uploaded with field names "foo" and "bar". I want to, while the upload is in progress, analyse the contents of the files while storing them somewhere. This way I can give the user instant feedback of the analysis after the files are uploaded, rather than subsequently analysing them from wherever they're stored after the upload is finished, which would incur a significant delay.
But, "foo" and "bar" need to be analysed in a different way, and the only way to figure out which analysis to perform is to have the field name.
It would be nice to also have the field name passed to the :store function, like so:
This way different logic can be applied depending on the field.
Thanks
The text was updated successfully, but these errors were encountered: