stevenschmatz / export-google-form

:arrow_down_small: A small Google Apps Script file to export a form into a JSON file.
MIT License
105 stars 43 forks source link

Cannot find function asFileUploadItem in object Item. (line 57, file "Code") #4

Open pmpinto opened 6 years ago

pmpinto commented 6 years ago

Line 57 is:

  var typedItem = item[itemTypeConstructorName]();

And itemTypeConstructorName for this specific item is "asFileUploadItem".

I do have a file field on this form. Am I missing something?

KalipheGTU commented 6 years ago

Hi how we can insert file upload in this form and insert google maps with location piker? thank you

KalipheGTU commented 6 years ago

can you put a video tutorial to show us how to do it please thank you

SableRaf commented 1 year ago

This script builds a method from the item's type adding as as a prefix and Item as a suffix as seen below:

var itemTypeConstructorName = snakeCaseToCamelCase("AS_" + item.getType().toString() + "_ITEM"); 

The problem is that item has no asFileUploadItem() method (see the form API reference for item). This seems to be a long known issue with no fix in sight.