_getByUrl
Returns File data based on given URL.
Parameters
url
File ID number.
base64
An optional parameter which, if set to 1, changes the File's data string in a successful return to a base64 format.
Example
FM_api('File_getByUrl',[
'url'=>'files/0/683084/bc188e826790da0e9313d51487da1c25'
]
);On Success
On Default, the result will be similar to this:
{
"id":"427230",
"filename":"suppliers.csv",
"type_id":"683085",
"description":"",
"cdate":"2023-11-12 15:30:17",
"notes":null,
"owner_id":null,
"meta":"{
\"user_id\": \"92447\"
}",
"name":null,
"type_enum":"0",
"last_edited":"2023-11-12 15:30:17",
"url":"files\/0\/683085\/43f8f0ba191a7fd4c58c94c5b375f7e0",
"customer_readable":"0",
"file_last_edited":"2023-11-12 15:30:17",
"deleted":"0",
"ddate":"0",
"storage_type":"0",
"storage_instance":"0",
"filesize":"279",
"data":"Id,Name,\"Account Number\",Phone,Email,Website,\"Tax Number\",\"Contact Name\",\"Street Address 1\",\"Street Address 2\",Town,Region,Country,Postcode,Notes,\"Hold Status\"\n398092,\"Supplier<img onerror=\"\"console.error('supplier')\"\">\",,,,,,,,,,,,,,\"On Hold\"\n398096,test,,,,,,,,,,,,,,\"On Hold\"\n"
}If the parameter "base64" is given a value of 1, the data string becomes a base64 format:
On Failure
If the "url" parameter is not set:
If the "url" parameter's value does not match the URL of an existing File:
Last updated