// GetSignedDownloadURL creates a presigned URL for downloading a currently existing asset it AWS. URL expiry is specified by the timeout param.
GetSignedDownloadURL creates a presigned URL for downloading a currently existing asset it AWS. URL expiry is specified by the timeout param.
// GetSignedDownloadURL creates a presigned URL for downloading a currently existing asset it AWS . URL expiry is specified by the timeout param .
func (upld *AwsAssetUploader) GetSignedDownloadURL(assetName, timeout string) (string, error) {
	secondsTimeout := validateTimeout(timeout)
	resp, _ := upld.S3Manager.GetObjectRequest(&s3.GetObjectInput{
		Bucket: aws.String(bucketName),
		Key:    aws.String(assetName),
	})
	url, err := resp.Presign(time.Duration(secondsTimeout) * time.Second)
	if err != nil {
		log.Error().Msgf("Could not create a download URL for given object. Err: %s", err)
		return "", err
	}
	return url, nil
}
func ( upld * AwsAssetUploader ) GetSignedDownloadURL ( assetName , timeout string ) ( string , error ) { secondsTimeout := validateTimeout ( timeout ) resp , _ := upld . S3Manager . GetObjectRequest ( & s3 . GetObjectInput { Bucket : aws . String ( bucketName ) , Key : aws . String ( assetName ) , } ) url , err := resp . Presign ( time . Duration ( secondsTimeout ) * time . Second ) if err != nil { log . Error ( ) . Msgf ( " " , err ) return " " , err } return url , nil }
GetSignedDownloadURL creates a presigned URL for downloading a currently existing asset it AWS.
GetSignedDownloadURL creates a presigned URL for downloading a currently existing asset it AWS .