commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Cooper <mart...@apache.org>
Subject Re: Commons FileUpload, Hash and Commons IO
Date Thu, 02 Jul 2009 15:17:43 GMT
On Tue, Jun 30, 2009 at 12:17 PM, pedrofaundezgon@terra.es <
pedrofaundezgon@terra.es> wrote:

> Is it possible easily upload a file, from a browser, using Commons
> FileUpload hashing it using a message digest and coping it to the filesystem
> using Commons IO in a single (or simple) operation?


You kind of answered your own question. Single, no, but simple, yes:

1) Handle the uploaded file with Commons FileUpload in the usual way.
2) Calculate a digest using something like Commons Codec's
DigestUtils.md5().
3) Copy the file using something like Commons IO's IOUtils.copy().

--
Martin Cooper



>
>
> Ahora tambi&eacute;n puedes acceder a tu correo Terra desde el
> m&oacute;vil.
>
> Inf&oacute;rmate pinchando aqu&iacute;.
>
>
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message