Xuanwo commented on issue #2199:
URL:
https://github.com/apache/incubator-opendal/issues/2199#issuecomment-1532464488
Supabase has two different storage backend, s3 supports range, but file not:
```
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,
}
}
```
--
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]