File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -465,6 +465,14 @@ export class S3Store extends DataStore {
465465 return upload
466466 }
467467
468+ async read ( id : string ) {
469+ const data = await this . client . getObject ( {
470+ Bucket : this . bucket ,
471+ Key : id ,
472+ } )
473+ return data . Body as Readable
474+ }
475+
468476 /**
469477 * Write to the file, starting at the provided offset
470478 */
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export class GetHandler extends BaseHandler {
4141 }
4242
4343 // @ts -expect-error exists if supported
44- const file_stream = this . store . read ( id )
44+ const file_stream = await this . store . read ( id )
4545 const headers = { 'Content-Length' : stats . offset }
4646 res . writeHead ( 200 , headers )
4747 return stream . pipeline ( file_stream , res , ( ) => {
You can’t perform that action at this time.
0 commit comments