|
|
|
|
|
fContentType (Function) In french: fContentType Returns the type of file according to the MIME standard (Multipurpose Internet Mail Extensions). The "Content Type" tells the software how it should interpret the file. Remark: This function is equivalent to fMIMEType. // Add attachments to an email arrAttachment is array of strings = ["image.png", "video.mpeg", "file.pdf"] Â myEmail is Email ... FOR EACH sFile OF arrAttachment // Build the emailAttach variable myAttach is emailAttach myAttach.Name = sFile myAttach.Content = fLoadBuffer(sFile) // fContentType returns "image/png" for "image.png", // "vide/mpeg" for "video,mpeg" and "application/pdf" for "file.pdf" myAttach.ContentType = fContentType(sFile) Â // Add the attachment Add(myEmail.Attach, myAttach) END Â // Display a file in the user's browser in server code FileDisplay(sFile, fContentType (sFile))
Syntax
<Result> = fContentType(<File path>)
<Result>: Character string - File type according to MIME standard:
| | mimeTypeXMLApplication | XML content. | mimeTypeBinary | Binary content (byte stream). | mimeTypeDOC | Word file (*.doc) | mimeTypeDOCX | Word file (*.docx) | mimeTypeGIF | GIF image (*.gif) | mimeTypeHTML | HTML page (*.htm, *.html) | mimeTypeJPEG | JPEG image (*.jpg, *.jpeg) | mimeTypeJSON | JSON content. | mimeTypePDF | PDF document (*.pdf) | mimeTypePNG | JPEG image (*.png) | mimeTypeSOAP | SOAP content in XML format. | mimeTypeText | Text (*.txt) | mimeTypeXMLText | XML text | mimeTypeXLS | Excel file (*.xls) | mimeTypeXLSX | Excel file (*.xlsx) | mimeTypeZIP | ZIP file (*.zip) |
- Empty string ("") if the MIME type could not be determined.
<File path>: Character string - Name and full (or relative) path of the file (up to 260 characters).
- Full (or relative) path of directory (up to 260 characters). If this parameter corresponds to a directory name, this name may (or may not) end with "\".
A UNC path can be used.
Remarks The MIME type is determined from the file extension.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|