mirror of
https://github.com/HeyPuter/puter.git
synced 2026-01-07 21:50:25 -06:00
dev(puterfs): move read to extension
This commit is contained in:
@@ -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