ProcFormFileAdd

ProcFormFileAdd(
    int FormID,
    string File,
    string Name,
    string AlternateID,
    string Description,
    bool   IsStaffOnly,
    int    FolderID
)

Attaches a file to a Form.

Request

Request Data:

  • (int) FormID (required) – identify the Form to attach the image to.
  • (string) File (required) – base64 encoding of the file
  • (string) Name (required) – uploaded file name (include file extension matching the actual file type)
  • (string) AlternateID (optional, Since RPM24) – client-generated UUID
  • (string) Description (optional) – description for the uploaded file
  • (bool) IsStaffOnly (optional) – wether the file should be visible to staff users only
  • (int) FolderID (optional) – id for the folder to put the file into. If the folder ID is provided but is not found, the file is attached to the default location.
{
	"FormID": <int>,
	"File": <string>,
	"Name": <string>,
	"Description": <string>,
	"IsStaffOnly": <bool>,
	"FolderID": <int>
}

Response

{
    "Result": {
        "Success": true
    }
}

Errors

  • “Form not found”
  • “Invalid length for a Base-64 char array or string.”
  • “The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.”
  • “Attachemt with AlternateID already exists”
  • “User lacks permission” – the user must have edit permissions to the form and be a participant