The WEB SEND BLOB command allows you to send blob to the browser.
The type of data contained in the BLOB is indicated by type. This parameter can be one of the following types:
- type = Empty String (""): In this case, you don’t need to supply any more information in the BLOB. The browser will try to interpret the contents of the BLOB.
- type = File extension (example: ".HTM", ".GIF", ".JPEG", etc.): In this case, you specify the MIME type of the data contained in the BLOB by indicating its extension. The BLOB will then be interpreted according to its extension. However, the extension must be a standard one so that the browser can correctly interpret it.
- type = Mime/Type (example: “text/html”, “image/tiff”, etc.): In this case, you directly specify the MIME type of data contained in the BLOB. This solution offers you more freedom. Besides the standard types, you can pass a custom MIME type to send proprietary documents via Intranet. To do so, you only need to configure the browsers so that they recognize the type sent and so that they can open the appropriate application. The value you pass to type is, in this case, “application/x-[TypeName]”. In the client workstations’s browser, you reference this type and associate it to the “Launch the application” action. The WEB SEND BLOB command allows you to therefore send all types of documents, the Intranet clients automatically open the associated application.
Here is a list of the most common MIME types:
Extension | Mime/Type |
.htm | text/html |
.html | text/html |
.shtml | text/html |
.shtm | text/html |
.css | text/css |
.pdf | application/pdf |
.rtf | application/rtf |
.ps | application/postscript |
.eps | application/postscript |
.hqx | application/mac-binhex40 |
.js | application/javascript |
.json | application/json |
.txt | text/plain |
.text | text/plain |
.gif | image/gif |
.jpg | image/jpeg |
.jpeg | image/jpeg |
.jpe | image/jpeg |
.jfif | image/jpeg |
.pic | image/pict |
.pict | image/pict |
.tif | image/tiff |
.tiff | image/tiff |
.mpeg | video/mpeg |
.mpg | video/mpeg |
.mov | video/quicktime |
.moov | video/quicktime |
.aif | audio/aiff |
.aiff | audio/aiff |
.wav | audio/wav |
.ram | audio/x-pn-realaudio |
.sit | application/x-stuffit |
.bin | application/x-stuffit |
.xml | application/xml |
.z | application/x-zip |
.zip | application/x-zip |
.gz | application/x-gzip |
.tar | application/x-tar |
Note: For more information, go to http://www.iana.org and look for “Protocol Numbers and Assignment Services” topics.
The noContext parameter is only kept for compatibility, it is unused beginning with 4D v13.
The references to 4D variables and 4DSCRIPT type tags in the page are always parsed.
Refer to the example of the routine PICTURE TO GIF.