File Handling

Function Description
ftos.context.response.setDownload Downloads a file from the file upload location.
ftos.files.download Returns the contents of a stored file encoded using the Base64 scheme.
ftos.files.upload Saves a Base64 encoded file to the the file upload location.
ftos.files.getBase64String Returns the contents of a stored file encoded using the Base64 scheme.
ftos.files.getMimeType Returns the MIME type of a string encoded using the Base64 scheme.
ftos.files.getBlob Returns a pointer to a stored file.
ftos.convert.base64.toPdf Uploads the content of a file encoded using the Base64 scheme to the upload folder using a specified file name.

 

 

ftos.files.getByteArray Returns the content of a stored file in a UTF-8 encoded array.
ftos.files.pdf.getPagesCount Returns the number of pages of a stored PDF file.
ftos.files.addToArchive Creates a .zip archive with the specified files and saves it in the upload folder.
ftos.convert.docx.toPdf Converts a stored .docx file to PDF format and saves it to the upload folder.
ftos.convert.image.toPdf Converts a stored image file to PDF format and saves it to the upload folder.
pdfPageToImage Converts a page from a stored PDF file to a .jpg image and saves it to the upload folder.
ftos.files.pdf.convertPageToImage Converts a page from a stored PDF file to a .jpg image and saves it to the upload folder.
ftos.files.pdf.insertImage Inserts an image in a PDF and saves the resulting file to the upload folder using a specified file name.
ftos.files.pdf.writeText Inserts text boxes in a PDF file and uploads the resulting document in the upload folder.
ftos.files.pdf.getPages Extracts a page range from a stored PDF file and saves it to a new PDF file in the upload folder.
ftos.documents.generateById Calls a document report based on the report ID.
ftos.documents.generateByName Calls a document report based on the report name.
getReport Calls a document report and returns the ID of the resulting file that was saved in the upload folder.
ftos.files.mergeAsPdf Concatenates multiple files and returns the ID of the resulting file (saved in the upload folder).
ftos.files.pdf.flatten Flattens a stored PDF file and saves it to the upload folder.
ftos.files.pdf.optimize Reduces the size of a PDF file and returns its content using the Base64 encoding.
ftos.files.pdf.encrypt Password protects a stored PDF file and saves it to the upload folder.
ftos.files.pdf.setPdfType Converts a PDF file to the PDF/A-1a or PDF/A-1b standard and saves it in the upload folder.
ftos.files.pdf.replaceTokens Replaces all occurrences of a specified text string from a stored PDF file and saves the resulting PDF file in the upload folder.
ftos.files.pdf.merge Concatenates multiple PDF files into a single one and saves it to the upload folder.
ftos.files.listFolder Returns the file names for all the files stored in a known folder.
ftos.files.move Moves a file to a known folder.
ftos.files.recycle Saves a copy of an orphan file in the $RecycleBin subfolder of the default upload folder.
ftos.files.getDeleted Returns orphan files information (files that have no entity link due to entity changes or removal).
ftos.files.getTextReader Stores the content of a file in a WorkflowTextFileReader object which can be read as a string, either line-by-line or all-at-once.
ftos.files.getTabularData Imports tabular data from a plain text (.csv) or Excel (.xlsx) file stored in the file upload location.