MIME types and Permission Problems

MIME types and Permission Problems

  
Hey everyone,

I've got a bit of a puzzler for us today.  I'm working on nifty feature to a project that I'm working on that allows the users to upload video and audio files onto our server, then be able to play them.  I'm working heavily with HTML5's <audio> and <video> tags, and since I'm working in IE9, that means that the filetypes that I'm forced to work with are MP3 and MP4.  To hold the video and audio files, I've created a folder called Media, which will have an unspecified number of subdirectories. 

This brings me to two hair-tearing problems, both of which I believe have a single source.  First up is: the MP4 format.  The way that Outsystems is currently publishing, the .mp4 file format is not assoicated with the video/mp4 MIME type.  I've tried logging into our server, going into IIS, and manually adding the MIME type, which works great!  The MP4 videos play, and all seems well, right up until the moment that I republish from Outsystems.  After that, everything falls to pieces, as that freshly added MIME type for .mp4 vanishes and MP4s are no longer recognized.  For this problem, I ask: What's exactly going on here?  What can I do to have the Outsystems service publish including the MIME type?

My second problem also, as I suspect, lies with the way that Outsystems publishes.  If I upload a video to this Media folder, then check on the server (By the way, I am using the NetworkFileSystem extension for this) the file is there, sure as rain.  However, if I attempt to play the video/audio through the published web site, the video/audio does not show up.  After the next publish, however, the video/audio becomes available for use.  This brings me to my next set of questions: Is it possible to force the browser to directly access the server files?  How would I go about accomplishing this?

Thanks, and here's hoping for a speedy reply.

-Eric

Hi Eric,

Considering the second part of the problem I'm not sure how It even works after a republish ..pretty sure you are not placing the files in correct folder (or they would dissapear after publish instead of appearing)

What folder are you using to upload?
If your answer contains the platform folder, I can tell you already that it should't.

As for the mime type problem some configurations done at the application level are lost on publish because the web.config is regenerated.

 Set the mimetype at an higher level, like web site or web server.
Or create a separate virtual directory to have the files served (solves your other problem) and set it there.

Regards,
João Rosado