Hi all,
Any idea why I’m getting this error from Matrix 5.5 when trying to use the JS API to create a PDF file asset:
error => The supplied file extension "" is not allowed for file type "pdf_file" errorCode => fileExtensionError
Here’s my code (straight from Squiz’s manual):
js_api.createFileAsset({
"parentID":406731,
"type_code":"pdf_file",
"friendly_name":"File #1",
"link_type":"SQ_LINK_TYPE_1",
"link_value":"link value",
"dataCallback":printObject
})
There is no reference to an extension parameter in Squiz’s manual and I’ve even CTRL+F’d the page and can’t find any reference to ‘extension’!!
Also, does anyone have a clue what the ‘type_code’ is for a plain File asset?