Create Attachment through API

Hi,

I am trying to create an attachment through the API. I have copied a request from the inspector, changed the file name so it does not exist but when I make the post through the apidocs I get a response ‘Upload of files with the extension ‘.’ is prohibited. Please contact your admin to enable it.’

The data posted is
{
“name”: “atrosupplierbrandBMS2.csv”,
“type”: “text/csv”,
“size”: “277”,
“file”: “data:text/csv;base64,ImJyYW5kIiwiYnJhbmRjb2Rla2tra2tra2tra2trIiwiU3VwcGxpZXJuYW1lIiwiU3VwcGxpZXJjb2Rla2tra2tra2tra2trIgoiQkVQIE1hcmluZSIsImJlcF9tYXJpbmUiLCJCTVMiLCJibXMiCiJCWUQiLCJieWQiLCJCTVMiLCJibXMiCiJLMiIsImsyIiwiQk1TIiwiYm1zIgoiUWNlbGxzIiwicWNlbGxzIiwiQk1TIiwiYm1zIgoiRnJvbml1cyIsImZyb25pdXMiLCJCTVMiLCJibXMiCiJTZWFyY2ggYnkgIGJyYW5kIiwic2VhcmNoX2J5X19icmFuZCIsIkJNUyIsImJtcyI=”
“field”: “importFile”,
“role”: “Attachment”,
“global”: true,
“md5”: “dnGHFXgHNXni/DmWh62YnQ==”
}

I am confused as to why the request works through the UI but making the same request externally does not

Hello Paultvis,

Could you please check if the problem still exists in the new version of the system.

Here you can find information about the methods of uploading files to the system via the API REST API | AtroCore Help Center