Newer Version Available

This content describes an older version of this product. View Latest

abortFileUpload(repositoryId, fileId, uploadId)

To cancel a file upload, the abortFileUpload method is invoked. This method is specifically used for aborting multi-part uploads to an external storage.

Signature

1ConnectApi.ContentHubFileUploadConnect.abortFileUpload(repositoryId, fileId, uploadId)

Parameters

  • repositoryId:

    Type: String

    The ID of the repository.

  • fileId:

    Type: String

    The ID of the file to be uploaded.

  • uploadId:

    Type: String

    The ID of the upload task.

  • Sample Code Snippet:
    1     @AuraEnabled(cacheable=false)
    2    public static void abortFileUpload(String repositoryId, String fileId, String uploadId) {
    3        try{
    4            ConnectApi.ContentHubFileUploadConnect.abortFileUpload(repositoryId, fileId, uploadId);
    5            return;
    6        }
    7        catch(Exception ex) {
    8            throw new AuraHandledException('Error in abortFileUpload: ' + ex.getMessage());
    9        }
    10    }