I would like to use the gapi js SDK client to trash a file. But i cannot find a working example. I do not know where to place the trashed attribute in the call
gapi.client.drive.files.update({fileId: 'someId', trashed: true}); doesnt work.
My working code is:
var id = "someId";
gapi.client.drive.files.update({
"fileId": id,
"trashed": true
}).then(function (evt) {
//someAction after delete file
});
Regards.