This commit is contained in:
Chris Troutner
2024-02-04 20:35:34 -08:00
parent c6c8b6418c
commit 16247372f1
+3 -3
View File
@@ -124,13 +124,13 @@ class IpfsRESTControllerLib {
} }
} }
async downloadFile(ctx) { async downloadFile (ctx) {
try { try {
const {cid} = ctx.params const { cid } = ctx.params
const file = await this.adapters.ipfs.ipfs.blockstore.get(cid) const file = await this.adapters.ipfs.ipfs.blockstore.get(cid)
return file return file
} catch(err) { } catch (err) {
wlogger.error('Error in ipfs/controller.js/downloadFile(): ', err) wlogger.error('Error in ipfs/controller.js/downloadFile(): ', err)
this.handleError(ctx, err) this.handleError(ctx, err)
} }