-
I have a nodejs-micro. i have already uploaded a couple of PDF files const reports = deta.Drive('reports')
const file = await reports.get(fileName).then(a => a.arrayBuffer())
fs.writeFileSync('./' + fileName, Buffer.from(file))
res.download(fileName) where i convert the BLOB object to a PDF file, and then make it available for Download. But when i deployed my micro, this didn't work because I'm probably not allowed to access the filesystem on deta. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
Deta drive doesn't support that. But yes you can store the file in micro at |
Beta Was this translation helpful? Give feedback.
-
@jnsougata thanks. |
Beta Was this translation helpful? Give feedback.
-
@ooralas micros do not persist data. you can't download things there and expect them to exist the next time. to make it a bit more clear, if you download a file during with one request and tried to read it in the other, it's almost always not there. to be able to help you, please provide more details on what you're trying to achieve on a high level. |
Beta Was this translation helpful? Give feedback.
-
@aavshr thanks for your answer, after i update the
@aavshr i couldn't mark you answer in the thread as an answer, so i will do it hier :). |
Beta Was this translation helpful? Give feedback.
@aavshr thanks for your answer, after i update the
.env
file it worked.@aavshr i couldn't mark you answer in the thread as an answer, so i will do it hier :).