SP_SetFileType
Sets the format in which to upload the document to the SharePoint library, for example TIF or PDF.
Syntax
bool SP_SetFileType(StrParam)
Parameters
A string indicating the type or filename extension of the images to be uploaded for each document or batch. When uploading the Batch or Document this extension is appended to the BatchID or DocumentID to select the image. The IMAGEFILE property takes precedence for Page uploads. See the description of SP_Upload for details. Valid parameters include: tif, tiff, jpg, jpeg, jpe, gif or pdf. The parameter may optionally include a period (for example .tif and .jpeg are also valid).
Smart parameters are supported.
Returns
False if the parameter is not a three-character extension, jpeg, or tiff, with or without a leading period. Otherwise True.Note: If a three-character
extension is supplied that is invalid for SharePoint images, the upload may
fail.
Level:
All.Details
Note: SP_SetUploadMode takes precedence
over SP_SetFileType, if SP_SetUploadMode is called prior to SP_Upload
this parameter has no effect. If neither SP_SetFileType nor SP_SetUploadMode
are called, tif is used as the default file type.
- Example
SP_SetFileType("jpg")