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.
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.
The above examples didn't work for me, but I found a more recent answer that does:
gapi.client.drive.files.update({
fileId: 'someId',
responseBody: {
trashed: true
}
});