DocsServiceApp icon indicating copy to clipboard operation
DocsServiceApp copied to clipboard

Permanently delete file from Google Drive.

Open seferdemirci opened this issue 4 years ago • 2 comments

When using insertImage() function, to prevent clone sheets from becoming a massive dump in the trash, please mind if add this piece of code.

Screen Shot 2021-04-03 at 01 32 01

seferdemirci avatar Apr 02 '21 22:04 seferdemirci

Thank you for your pull request. About changing DriveApp.getFileById(tmpId).setTrashed(true); to Drive.Files.remove(tmpId);, Drive.Files.remove sometimes occurs an internal error. I'm worried that this might be related to the process of the file. But I have no clear information about it. So, I used DriveApp.getFileById(tmpId).setTrashed(true);. I deeply apologize that this was not your expected result.

tanaikech avatar Nov 16 '22 12:11 tanaikech

Now, I came up with a direction. In this case, how about including Drive.Files.remove as an option? The default uses DriveApp.getFileById(tmpId).setTrashed(true);. When the option is used, Drive.Files.remove is used. How about this?

tanaikech avatar Nov 16 '22 13:11 tanaikech