Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function SAVE(){
- const u = 'https://mindortrans.tatarstan.ru/file/mindortrans/File/%D1%80%D0%B5%D0%B5%D1%81%D1%82%D1%80%20%D0%BD%D0%B0%20%D1%81%D0%B0%D0%B9%D1%82%2030.10.2020.pdf';
- const b = getFileBlob123(u);
- Logger.log(saveBlob123(b, '1NKirQt9K_xJUQmFgrJb_pzHKZvCwAhZFNlILvRkKWM8'));
- }
- function getFileBlob123(url){
- var params = {
- "method":"POST",
- "contentType": 'application/pdf',
- };
- return UrlFetchApp.fetch(url).getBlob();
- }
- function saveBlob123(blob, id) {
- Drive.Files.update({title: name}, id, blob, {
- convert: true
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement