You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be within the scope of this package (and by extension then the @adonisjs/drive package) to include a method for generating signed urls for file uploads?
Thinking basically the same as getSignedUrl just modified to use the createPutObjectCommand instead of createGetObjectCommand
/** * Returns a signed URL for uploading objects directly to S3. */asyncgetSignedUploadUrl(key: string,options?: SignedURLOptions): Promise<string>{const{contentType,expiresIn, ...rest}=Object.assign({},options);constsignedURLOptions: PutObjectCommandInput={Key: key,Bucket: this.options.bucket,ContentType: contentType,
...rest,};returngetSignedUrl(this.#client,this.createPutObjectCommand(this.#client,signedURLOptions),{expiresIn: string.seconds.parse(expiresIn||'30mins')});}
The text was updated successfully, but these errors were encountered:
Would it be within the scope of this package (and by extension then the
@adonisjs/drive
package) to include a method for generating signed urls for file uploads?Thinking basically the same as getSignedUrl just modified to use the
createPutObjectCommand
instead ofcreateGetObjectCommand
The text was updated successfully, but these errors were encountered: