Skip to content

Commit

Permalink
Merge pull request #190 from praveenKDass/release-6.0.0_cloud
Browse files Browse the repository at this point in the history
changes:getDownloable URL issue fixes for GCP
  • Loading branch information
aks30 committed Jul 19, 2024
2 parents a99552d + ba9aa51 commit fa09c1f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions module/files/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ module.exports = class FilesHelper {
file: file,
payload: { sourcePath: file },
cloudStorage: cloudStorage.toUpperCase(),
};
if (process.env.CLOUD_STORAGE_PROVIDER !== constants.common.G_CLOUD) {
response.downloadableUrl = await cloudClient.getDownloadableUrl(
bucket,
file,
linkExpireTime // Link ExpireIn
};
// Generate a read-only pre-signed URL for downloading a file from the Cloud bucket
response.getDownloadableUrl = await cloudClient.getSignedUrl(
bucket, // bucket name
file, // file path
linkExpireTime, // expire
constants.common.READ_PERMISSION // read/write
);
}
if (!serviceUpload) {
response.url = await cloudClient.getSignedUrl(
bucket, // bucket name
Expand Down

0 comments on commit fa09c1f

Please sign in to comment.