return uploadToStorage({ objectStorageKey, content: fileStream, bucketInfo, isPrivate })
}
+async function storeContent (options: {
+ content: string
+ inputPath: string
+ objectStorageKey: string
+ bucketInfo: BucketInfo
+ isPrivate: boolean
+}): Promise<string> {
+ const { content, objectStorageKey, bucketInfo, inputPath, isPrivate } = options
+
+ logger.debug('Uploading %s content to %s%s in bucket %s', inputPath, bucketInfo.PREFIX, objectStorageKey, bucketInfo.BUCKET_NAME, lTags())
+
+ return uploadToStorage({ objectStorageKey, content, bucketInfo, isPrivate })
+}
+
// ---------------------------------------------------------------------------
async function updateObjectACL (options: {
buildKey,
storeObject,
+ storeContent,
removeObject,
removeObjectByFullKey,
// ---------------------------------------------------------------------------
async function uploadToStorage (options: {
- content: ReadStream
+ content: ReadStream | string
objectStorageKey: string
bucketInfo: BucketInfo
isPrivate: boolean
logger.debug(
'Completed %s%s in bucket %s',
- bucketInfo.PREFIX, objectStorageKey, bucketInfo.BUCKET_NAME, lTags()
+ bucketInfo.PREFIX, objectStorageKey, bucketInfo.BUCKET_NAME, { ...lTags(), reseponseMetadata: response.$metadata }
)
return getInternalUrl(bucketInfo, objectStorageKey)