[Catalyst] determine MIME type of binary Webservice result?
William Wueppelmann
william.wueppelmann at canadiana.ca
Tue Jan 19 14:38:59 GMT 2010
On 2010-01-19, at 9:21 AM, Jens Schwarz wrote:
> Hi,
>
> in my Catalyst application I use Webservices to connect to SAP. One of these returns "binary" data (right now base64-encoded XML, later also PDF).
>
> Is it possible to determine the MIME type of those returned (sub)strings? If so, how?
>
> Thanks
>
> Jens
> --
> Preisknaller: GMX DSL Flatrate für nur 16,99 Euro/mtl.!
> http://portal.gmx.net/de/go/dsl02
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
I am using File::MimeInfo::Magic to determine MIME types for uploaded files. I haven't tried to use it with in-memory strings as opposed to on-disk files, but the docs for File::MimeInfo say that this is doable.
-William
More information about the Catalyst
mailing list