hya knack experts,
as per instructions in
https://docs.knack.com/docs/fileimage-uploads
I can upload a file with curl, get an ID from the response file, can see that file by pasting the link into Chrome, BUT when it comes to creating the record, although I get (what looks like) a successful response , the record still doesnt appear in knack.
response from creating the file is
{"id":"60b831ehohoho3001e22191a","type":"image","filename":"cld2.jpg","public_url":"https://s3.amazonaws.com/assets.knackhq.com/assets/55ahahahaha4/60b831hohoho191a/original/cld2.jpg","thumb_url":"http
s://s3.amazonaws.com/assets.knackhq.com/assets/55ahahahaha4/60b831hohoho191a/60b831ef277a23001e22191a/thumb/cld2.jpg","size":93976}
then my curl command to create the record:
curl -X POST "https://api.knack.com/v1/objects/object_23/records" \
-H "x-knack-rest-api-key: 33blahblahblahThisismykeyhahahahaha7" \
-H "x-knack-application-id: 55ablahblahapplID4" \
-H "content-type: application/json" \
--data '{"field_361": "60b831ef277a23001e22191a" , "field_351": "mydoc" , "field_352": "ND3003" , "field_353":"Fire Test" , "field_355": "wade lee" }' > /temp/knack-rec-resp.txt
and this is the response from the curl -X POST
{"id":"60b834f9ca890d001ec65f96","field_352":"","field_352_raw":["N","D","3","0"],"field_351":"mydoc","field_351_raw":"mydoc","field_353":"Fire Test","field_353_raw":"Fire Test","field_354":"03/06/2021","field_354_raw":{"
date":"06/03/2021","date_formatted":"03/06/2021","hours":"12","minutes":"00","am_pm":"AM","unix_timestamp":1622678400000,"iso_timestamp":"2021-06-03T00:00:00.000Z","timestamp":"06/03/2021 12:00 am","time":720},"field_361"
:"<a class=\"kn-view-asset\" data-field-key=\"field_361\" data-asset-id=\"60b831ef277a23001e22191a\" data-file-name=\"cld2.jpg\" href=\"https://api.knack.com/v1/applications/55hahahahahaha222d4/download/asset/60b831e
f277a23001e22191a/cld2.jpg\">cld2.jpg</a>","field_361_raw":{"id":"60b831ef277a23001e22191a","application_id":"55aece5913d79a5652d222d4","s3":true,"type":"image","filename":"cld2.jpg","url":"https://s3.amazonaws.com/assets
.knackhq.com/assets/55aecdadadadadad4/60b8dodododo22191a/original/cld2.jpg","thumb_url":"https://s3.amazonaws.com/assets.knackhq.com/assets/55aecdadada22d4/60b831dododo1e22191a/thumb/cld2.jpg","s
ize":93976,"field_key":"field_361"},"field_355":"","field_355_raw":["w","a","d","e"," ","l"]}
Note: field_352 is the contract and it does exist and field_355 is the user and it does exist as well. What is shown in the _raw fields for those is funny though, maybe this is the problem ?
I have also tried to only enter the field_361 (document) , i've put other users, other contracts, etc.. but i'm running out of ideas and the record still does not appear !
help !