|It indicates the content type that should be associated with the Blob. For example, the content type of .wav documents is generally audio/wav, for an .xml file it's text/xml, etc. |
The Content Type depends on the browser, and that's why the GeneXus user is given the possibility to set it programmatically. However, the corresponding Content Type is actually determined at runtime by the generated program.
That is to say, in most cases you only need to set the File Type properties or not to set anything, if the blob has a FileTypeAttribute associated to it. This is because GeneXus automatically determines the Content Type, from these information.
The ContentType property should be used when the extension doesn't allow to uniquely identify the Content Type, or when the GeneXus user wants to set it depending on the end user's browser.
Content Type design property
You can configure it, by editing the blob control properties:
Programmatically, you can change the ContentType, as in the following example:
&FileType = Attblob.FileType //Retrieve the extension of the file
if &FileType = "mpg"
Attblob.ContentType = "application/x-mplayer2" //Change ContentType