We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to return a file from Deployd? Neither of these work.
ctx.res.setHeader('Content-Type', 'application/zip'); ctx.res.end(fs.readFileSync(filePath)); or setResult(fs.readFileSync(filePath));
The text was updated successfully, but these errors were encountered:
setResult() should work, but you also need to specify the proper mime type.
setResult()
You can do that via setHeader('Content-Type', 'your/mime-type') once deployd/deployd#851 is merged and released.
setHeader('Content-Type', 'your/mime-type')
Edit: Make sure you're using the just released version ^1.0.0
^1.0.0
Sorry, something went wrong.
Just edited the issue. Yes. I tried with ctx.res.setHeader('Content-Type', 'application/zip'); didn't work.
Problem with Deployd is , it restricts some of the basic features of Nodejs like this one and request.On - because of the ctx wrapper .
This should work now with deployd ^1.1.2 and dpd-event ^1.1.1.
^1.1.2
^1.1.1
No branches or pull requests
How to return a file from Deployd?
Neither of these work.
ctx.res.setHeader('Content-Type', 'application/zip');
ctx.res.end(fs.readFileSync(filePath));
or
setResult(fs.readFileSync(filePath));
The text was updated successfully, but these errors were encountered: