You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this code for uploading an image, I follow the docs but I'm getting an 301 error from amazon. Is this a bug in knox? The amazon cli uploads my files just fine.
require('dotenv').config()varknox=require('knox')varclient=knox.createClient({key: process.env.S3_KEY,secret: process.env.S3_SECRET,bucket: process.env.S3_BUCKET});varfile="image.jpg"varupload_name="upload_"+fileclient.putFile(file,upload_name,{"Content-Type": "image/jpeg"},function(err,result){if(err!=null){returnconsole.log(err)}else{console.log(result.statusCode)returnconsole.log("Uploaded to amazon S3")}})
The text was updated successfully, but these errors were encountered:
I'm using this code for uploading an image, I follow the docs but I'm getting an 301 error from amazon. Is this a bug in knox? The amazon cli uploads my files just fine.
The text was updated successfully, but these errors were encountered: