Friday, 7 April 2017

Can't delete file in Fine uploader

I used node js sever code to upload files to aws s3. And succeed in uploading files to s3 bucket. But now i can't delete uploaded files from s3 bucket. in node js code are parameters of req.query.bucket and req.query.key. I don't understand what is meaning of bucket and key,so i don't know how to set this values in delete file options. Can you help me ?

node js API:

export function deletefile(req, res) {
   deleteFile(req.query.bucket, req.query.key, function(err) {
        if (err) {
            console.log("Problem deleting file: " + err);
            res.status(500);
        }
        res.end();
    });
};

delete file option of fine uploader in client

 ........
   deleteFile: {
                enabled: true,
                method: "POST",
                forceConfirm: true,
                endpoint: "/rest-api/deletefile"

            },......



via Alvin Tan