Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8150765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T15:09:44+00:00 2026-06-06T15:09:44+00:00

There is something I do not understand with the Apps Script GUI Builder. I

  • 0

There is something I do not understand with the Apps Script GUI Builder.
I am trying to have a File Upload and I cannot have it working.
Basic setup: form panel, a flow panel, a file upload, a submit button.
I did not put any Events on On Mouse Click (I understood that the doPost catch it by default).

The associated functions:

function appBVFileUpload2() {
   var mydoc = SpreadsheetApp.getActiveSpreadsheet();  
   var app = UiApp.createApplication().setTitle('File Upload');
   app.add(app.loadComponent("ImportationBV")); // load the GUI
   mydoc.show(app); 
}

function doPost(e) {
  // data returned is a blob for FileUpload Form
  var fileBlob = e.parameter.thefile; // thefile is the name of the File Upload Object
  var doc = DocsList.createFile(fileBlob); // Generate the Error <<<
  var app = UiApp.getActiveApplication();
  app.close();
  return app; 
}

So I always get an error when clicking on the submit button:

Error encountered: An unexpected error occurred

Important note: the error is generated by the line var doc = DocsList.createFile(fileBlob); . So I suspect either the data from the file upload object is not received properly.

Interestingly enough the example provided by Google here works for me. Meaning that if the GUI is done via code and not via the GUI builder the upload works.

I triple checked everything, I am really puzzled, and start to think there may be a bug with the File Upload via the GUI Builder. Any help?

Thanks for any help on this matter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T15:09:45+00:00Added an answer on June 6, 2026 at 3:09 pm

    This error comes often when the name of the widget is not what it should be, you could try to log the e.parameter to see what is in it…Logger.log(e.parameter);
    Check also that the widget’s name has no accidental space in it…

    EDIT : following your comments, I tested it here and it works. Could you please check if you have the same setup (component tree, names…) , here is a screen cap. :
    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JTable with a JScrollPane. There is something i do not understand
There is something I am trying to accomplish although I'm not really sure where
I'm learning c# and there is something I do not understand that I've been
math.h is not really a documentation. Is there something else that will describe these
there is something puzzling me and I did not find much information on the
want to ask user to input something but not want to wait forever. There
Is there a way for something to raise and exception that does not descend
Exact duplicate of Function name for creating something if it's not there yet I
I am trying to learn something basic and very important to develop decent iPhone
There is something I don't quite understand right now. My main activity class creates

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.