AppsScriptPulse

[Fixed] Google Apps Script Web App HTML form file-input fields not in blob compatible format

Image by Tumisu from Pixabay

HTML form file-input fields are not converted to compatible blob format when submitted. They are left in application/octet-stream format. The file-input fields are passed as application/octet-stream, so DriveApp.createFile(formBlob) does not work correctly … So the functionality provided by HtmlService is not consistent with the documentation

There was an annoying little Google Apps Script issue which meant when handling file uploads to published Web Apps some additional coding was required rather than just sending the file blob server side. Thankfully the open issue ticket for this has recently been marked and confirmed fixed.

Source: HTML form file-input fields not in blob compatible format

2 comments for “[Fixed] Google Apps Script Web App HTML form file-input fields not in blob compatible format

  1. 9 December, 2021 at 22:1925

    Kanshi Tanaike has kindly got in touch with Pulse to highlight this fix currently only works for published Web Apps and does not include dialogs and sidebars. We’ve added a note to the issue ticket linked in the post.

Leave a Reply

Your email address will not be published. Required fields are marked *