For GCP cloud storage bucket Get the file path based on the file ID.
StorageApi.getFilePath(fileId)
Parameters
fileId: string
Returns
The file path for the input File ID.
getFileIdByPath
For GCP cloud storage bucket Get the file ID based on the absolute file path.
StorageApi.getFileIdByPath(absoluteFilePath)
Parameters
absoluteFilePath: string
Returns
The File ID using file path.
getFolderPath
For GCP cloud storage bucket Get the folder path based on the folder ID.
StorageApi.getFolderPath(folderId)
Parameters
folderId: string
Returns
Folder path.
getSignedUrl
For GCP cloud storage bucket Get a signed URL for accessing a file.
StorageApi.getSignedUrl(filePath)
or
StorageApi.getSignedUrl(filePath, duration, unit)
or
StorageApi.getSignedUrl(bucketName, filePath)
or
StorageApi.getSignedUrl(bucketName, filePath, duration, unit)
Parameters
filePath: string
duration: int
unit: string
bucketName: string
Returns
Signed URL for accessing the file.
copyFileToBucket
For GCP cloud storage bucket Copy a file to the specified bucket.
StorageApi.copyFileToBucket(sourceFilePath, targetFilePath)
or
StorageApi.copyFileToBucket(bucketName, sourceFilePath, targetFilePath)
or
StorageApi.copyFileToBucket(bucketName, serviceAccountPropName,
sourceFilePath, targetFilePath)
For GCP cloud storage bucket Copy a file within the same bucket.
StorageApi.copyFileWithinBucket(sourceFilePath, targetFilePath)
or
StorageApi.copyFileWithinBucket(sourceFilePath, targetFilePath, makeCopy)
or
StorageApi.copyFileWithinBucket(bucketName, sourceFilePath, targetFilePath)
or
StorageApi.copyFileWithinBucket(bucketName, sourceFilePath, targetFilePath, makeCopy)