Table of Contents

TTMSFNCCustomCloudFileConversion Class

Base class that connects to an online file-conversion service and drives the full conversion workflow: creating jobs from a URL, a local file or base64 content, uploading source files, polling job details, and downloading the converted output to a stream or to disk.

API unit family: TMSFNCCloudFileConversion Inherits from: TTMSFNCCloudBase Implements: ITMSFNCCustomCloudFileConversionProperties

Syntax

TTMSFNCCustomCloudFileConversion = class(TTMSFNCCloudBase, ITMSFNCCustomCloudFileConversionProperties)

Remarks

This class exposes the conversion API but keeps its properties and events protected. Use the published descendant TTMSFNCCloudFileConversion to access them at design time.

Methods

Name Description
CancelConvertJob Cancels a conversion job on the service, identified by its provider id.
ConvertFile Creates a conversion job for a local file and uploads it to the service.
ConvertFileFromBase64 Creates a conversion job from base64-encoded file content.
ConvertFileFromURL Creates a conversion job that converts a file referenced by a URL to the requested output format.
DownloadFileToFile Downloads the given output file and saves it to disk.
DownloadFileToStream Downloads an output file into an in-memory stream, selecting the job and file by their provider ids.
ExtractFileConversionFileName Extracts the file name, including its extension, from a local path or a URL.
GetConversionFileFormatFromString Maps a file-extension string to its matching format value.
GetConvertJobById Returns the job with the given provider identifier from the component's job collection.
GetConvertJobDetails Requests the current details of a job, identified by its provider id, refreshing its status and output files.
GetConvertJobs Retrieves the list of conversion jobs from the service and stores them in the component.
GetFileFormatText Returns the file-extension text that corresponds to a format value.
GetStatusText Returns a human-readable label for a job status value.
ValidFileName Checks whether a file name is acceptable as a conversion source.