You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Paulo Sergio <pa...@gmail.com> on 2008/07/06 04:16:08 UTC

filename from array of bytes

Hi,
i'm not sure if this question makes sense but currently i have a service
that receives a file as an array of bytes, and i need a way to get the file
name and mime type, is there any way to do this ? or these info is kept only
on the filesystem and there is no way to get it from the content?

thanks in advance
paulo f.

Re: filename from array of bytes

Posted by Song Jason <ja...@gmail.com>.
of course you cannot get filename or mime type from content.
you can set the name or any attributes to a header alike structure and send
before content.

On Sat, Jul 5, 2008 at 10:16 PM, Paulo Sergio <pa...@gmail.com> wrote:

> Hi,
> i'm not sure if this question makes sense but currently i have a service
> that receives a file as an array of bytes, and i need a way to get the file
> name and mime type, is there any way to do this ? or these info is kept
> only
> on the filesystem and there is no way to get it from the content?
>
> thanks in advance
> paulo f.
>