question about mime type video/x-flv

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

question about mime type video/x-flv

byersa
1. Why isn't it in mime-type.xml and where does mime-type.xml get used?

2. I call createDataResource and print out the value of DataResource
and it contains "video/x-flv" in the mimeTypeId, but in the next
service, the value is set to "application/octet-stream" and I cannot
find the seca that changes it. The console.log shows other secas
getting called, but nothing that could set this value.

Can anyone help me on this?

Thanks,

-Al
Reply | Threaded
Open this post in threaded view
|

Re: question about mime type video/x-flv

Mridul Pathak-2
Al,

    Please find my comments inline.

On Sun, Nov 29, 2009 at 12:36 PM, Al Byers <[hidden email]>wrote:

> 1. Why isn't it in mime-type.xml and where does mime-type.xml get used?
>

mime-type.xml is specifically used by CatalinaContainer to configure mime
types in web application context.


>
> 2. I call createDataResource and print out the value of DataResource
> and it contains "video/x-flv" in the mimeTypeId, but in the next
> service, the value is set to "application/octet-stream" and I cannot
> find the seca that changes it. The console.log shows other secas
> getting called, but nothing that could set this value.
>

If you don't pass mimeTypeId to createDataResource service as an IN
parameter, the service itself calls DataResourceWorker.getMimeType() method
inline to set the mime type of that data resource.  The
DataResourceWorker.getMimeType() uses FileExtension entity to get the mime
type based on the extension of the uploaded file.  If FileExtension entity
do not contain the mapping for that particular extension, the default is set
to "application/octet-stream".

This leaves us with a question here, what extension does the file you are
uploading have?  FileExtension entity of course don't have a mapping for
that extension which is the reason you are seeing this behavior.


>
> Can anyone help me on this?
>
> Thanks,
>
> -Al


--
Thanks & Regards
Mridul Pathak
Hotwax Media
http://www.hotwaxmedia.com
[hidden email]
-------------------------------------------------
direct: +91 - 942.592.6892
Reply | Threaded
Open this post in threaded view
|

Re: question about mime type video/x-flv

byersa
Mridul,

Thanks for taking the time to respond. Please see my comments below.

On Mon, Nov 30, 2009 at 6:50 AM, Mridul Pathak
<[hidden email]> wrote:

> Al,
>
>    Please find my comments inline.
>
> On Sun, Nov 29, 2009 at 12:36 PM, Al Byers <[hidden email]>wrote:
>
>> 1. Why isn't it in mime-type.xml and where does mime-type.xml get used?
>>
>
> mime-type.xml is specifically used by CatalinaContainer to configure mime
> types in web application context.
>
>
>>
>> 2. I call createDataResource and print out the value of DataResource
>> and it contains "video/x-flv" in the mimeTypeId, but in the next
>> service, the value is set to "application/octet-stream" and I cannot
>> find the seca that changes it. The console.log shows other secas
>> getting called, but nothing that could set this value.
>>
>
> If you don't pass mimeTypeId to createDataResource service as an IN
> parameter, the service itself calls DataResourceWorker.getMimeType() method
> inline to set the mime type of that data resource.  The
> DataResourceWorker.getMimeType() uses FileExtension entity to get the mime
> type based on the extension of the uploaded file.  If FileExtension entity
> do not contain the mapping for that particular extension, the default is set
> to "application/octet-stream".
>
> This leaves us with a question here, what extension does the file you are
> uploading have?  FileExtension entity of course don't have a mapping for
> that extension which is the reason you are seeing this behavior.

Mridul, I did set the mimeTypeId, so it was not using getMimeType().
But the file extension that I am using is "flv", which is in the
FileExtension table, so it should have found it anyway.  I am pretty
sure that it is setting the mimeTypeId of DataResource as I added a
log op to the service right before it creates the entity, but it is
getting changed somewhere. This does not happen if i send it a "swf"
file - that is why I wondered if it was tied to the mime-type.xml
file. But i added it there and it did not seem to make a difference.

-Al

>
>
>>
>> Can anyone help me on this?
>>
>> Thanks,
>>
>> -Al
>
>
> --
> Thanks & Regards
> Mridul Pathak
> Hotwax Media
> http://www.hotwaxmedia.com
> [hidden email]
> -------------------------------------------------
> direct: +91 - 942.592.6892
>