DEV Community

Discussion on: 5 Minutes Tutorial Series - NodeJS upload files to Minio

Collapse
 
dogancalli profile image
dogancalli • Edited

Hello it's me again :)
What am i doing wrong on my post method ?

app.post('/documents',(request, response) => {
    client.presignedPutObject('uploads', request.query.name, (err, url ,obj) => {
        dataAPI = {
                docName:$request.query.name,  
                docLink:"https://play.min.io:9000/uploads/"+request.query.name  
                }  
        response.send(dataAPI)
    })
});
Enter fullscreen mode Exit fullscreen mode
Thread Thread
 
gokayokyay profile image
Gökay Okyay

Hello!
It’s hard to tell just by looking at it but what’s with the dollar sign? Did you try to create a template literal? And it’ll be better gor you to check if any errors occurred.
Btw I didn’t use the presignedPutObject method on tutorial, have you read the docs? 😄