// GetSignedUploadURL creates a presigned URL for uploading an asset to AWS. The URL expiry is specified by timeout.
GetSignedUploadURL creates a presigned URL for uploading an asset to AWS. The URL expiry is specified by timeout.
// GetSignedUploadURL creates a presigned URL for uploading an asset to AWS . The URL expiry is specified by timeout .
func (upld *AwsAssetUploader) GetSignedUploadURL(timeout string) (string, string, error) {
	secondsTimeout := validateTimeout(timeout)
	awsName := uuid.New().String()
	resp, _ := upld.S3Manager.PutObjectRequest(&s3.PutObjectInput{
		Bucket: aws.String(bucketName),
		Key:    aws.String(awsName),
	})
	url, err := resp.Presign(time.Duration(secondsTimeout) * time.Second)
	if err != nil {
		return "", "", err
	}
	return awsName, url, nil
}
func ( upld * AwsAssetUploader ) GetSignedUploadURL ( timeout string ) ( string , string , error ) { secondsTimeout := validateTimeout ( timeout ) awsName := uuid . New ( ) . String ( ) resp , _ := upld . S3Manager . PutObjectRequest ( & s3 . PutObjectInput { Bucket : aws . String ( bucketName ) , Key : aws . String ( awsName ) , } ) url , err := resp . Presign ( time . Duration ( secondsTimeout ) * time . Second ) if err != nil { return " " , " " , err } return awsName , url , nil }
GetSignedUploadURL creates a presigned URL for uploading an asset to AWS.
GetSignedUploadURL creates a presigned URL for uploading an asset to AWS .