thanks in advance for any help
How to transfer a local photo file to google drive using multipart/form-data?
I have copied local files to google drive, obtained the google drive file link but following code line hangs and an error comes up related to the html???
var response = UrlFetchApp.fetch(vUrlTelegram + "/sendPhoto?chat_id=" + chat_id + "&photo=" + photoUrl );
note: have obtained html string for a sample photo from the internet, and the following telegram bot google api javascript code works
function sendPhoto( chat_id, photoUrl ) {
var response = UrlFetchApp.fetch(vUrlTelegram + "/sendPhoto?chat_id=" + chat_id + "&photo=" + photoUrl );
console.log(response.getContentText());
}
Telegram doco
Photo to send. Pass a file_id as String to send a photo that exists on the Telegram servers (recommended), pass an HTTP URL as a String for Telegram to get a photo from the Internet, or upload a new photo using multipart/form-data. More info on Sending Files »