AWS S3 is trying to downloading file when i get file #4493
Unanswered
tarikulker-js
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys! I'm a nodejs developer. I'm switched to Aws S3 from local file management. I have a issue about get file. Issue is when i trying to get file with GET request, browser is trying to download. I don't want it. I want is client just see file when send GET request to file, like that:
I'm checked the forums, documentation and
aws-sdk
codes! But still i have issue.here are my codes:
Server.js File:
S3 File:
const AWS = require('aws-sdk');
const mime = require('mime');
const s3 = new AWS.S3({
accessKeyId: process.env.S3_ACCESS_KEY_ID.trim(),
secretAccessKey: process.env.S3_SECRET_ACCESS_KEY_ID.trim(),
region: process.env.S3_REGION.trim()
});
Beta Was this translation helpful? Give feedback.
All reactions