Ji-Xinyou commented on issue #2199:
URL: 
https://github.com/apache/incubator-opendal/issues/2199#issuecomment-1532508416

   > Supabase has two different storage backend, s3 supports range, but file 
not. It's another issue from supabase storage side 🤣
   > 
   > ```
   >   async getObject(
   >     bucketName: string,
   >     key: string,
   >     version: string | undefined
   >   ): Promise<ObjectResponse> {
   >     const file = path.resolve(this.filePath, 
withOptionalVersion(`${bucketName}/${key}`, version))
   >     const body = fs.createReadStream(file)
   >     const data = await fs.stat(file)
   >     const { cacheControl, contentType } = await this.getFileMetadata(file)
   >     const lastModified = new Date(0)
   >     lastModified.setUTCMilliseconds(data.mtimeMs)
   > 
   >     const checksum = await fileChecksum(file)
   > 
   >     return {
   >       metadata: {
   >         cacheControl: cacheControl || 'no-cache',
   >         mimetype: contentType || 'application/octet-stream',
   >         lastModified: lastModified,
   >         // contentRange: data.ContentRange, @todo: support range requests
   >         httpStatusCode: 200,
   >         size: data.size,
   >         eTag: checksum,
   >         contentLength: data.size,
   >       },
   >       body,
   >     }
   >   }
   > ```
   
   What do you think, should we raise an issue there? 🤣 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to