[ome-devel] OMEIS Content header validity

Ilya Goldberg igg at nih.gov
Tue Feb 28 18:58:48 GMT 2006


When you say "download images", are you referring to OriginalFiles  
(the OME object which corresponds to the File OMEIS object)?
I think raw pixel data (GetPixel*) and the ReadFile OMEIS methods are  
the only ones that return application/octet-stream.  If you ask OMEIS  
for a rendered image, it returns the correct MIME type.  This is  
because application/octet-stream is the right thing for pixel data,  
and OMEIS doesn't know anything about file types (they're all  
application/octet-stream as far as OMEIS knows).

It would be somewhat of a challenge to do this right.  Possibly with  
libmagic, possibly with the unix command "file".  A very poor way of  
doing this is how its done in Windows - by looking at the file  
extension (the name of the file is stored by OMEIS).

Can you give some details what you want to achieve by this?   
Afterall, even though it downloads as an application/octet-stream,  
the OS will surely know what kind of file it is once you try to do  
something with it.
-Ilya


On Feb 28, 2006, at 12:51 PM, Thomas Kuo wrote:

> Hello,
>
> I've been trying to download images from the OME database; however,  
> the
> content-type or MIME type is currently set to application/octet-stream
> regardless of type.  I think it should be set according to the data  
> that
> is present, i.e. image/tiff for tiff images, etc.  This may be fairly
> easily done using a program like libmagic, that extracts the type from
> the header information.
>
> ~Thomas
>
> -- 
> Thomas Kuo
> Graduate Student
> Electrical & Computer Engineering Department
> University of California Santa Barbara
> Email: thekuo at umail.ucsb.edu
>
> _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>



More information about the ome-devel mailing list