mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-14 18:01:21 +00:00
dev(puterfs): move read to extension
This commit is contained in:
1 parent
0fd7100795
commit
f2ad7ddfb5
2 files changed
+22
-15
No files matched your search
@@ -885,21 +885,8 @@ class PuterFSProvider extends putility.AdvancedBase {
|
||||
version_id,
|
||||
range,
|
||||
}) {
|
||||
// TODO: one PuterFS aggregates its own storage, don't get it
|
||||
// via mountpoint service.
|
||||
const svc_mountpoint = context.get('services').get('mountpoint');
|
||||
const storage = svc_mountpoint.get_storage(this.constructor.name);
|
||||
const location = await node.get('s3:location') ?? {};
|
||||
const stream = (await storage.create_read_stream(await node.get('uid'), {
|
||||
// TODO: fs:decouple-s3
|
||||
bucket: location.bucket,
|
||||
bucket_region: location.bucket_region,
|
||||
version_id,
|
||||
key: location.key,
|
||||
memory_file: node.entry,
|
||||
...(range ? { range } : {}),
|
||||
}));
|
||||
return stream;
|
||||
console.error('This .read should not be called!');
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user