The fields have been created in my table. The Custom Code in the After Save section has been customized accordingly:
____________________________________________________________________________________
IF("#FILES#" != '#FILES'.'#'){ //has something been uploaded?
$J = json_decode("#FILES#"); //fetch the uploaded file information
$name = $J[0]->{'name'};
$type = $J[0]->{'type'};
$contents = file_get_contents(sys_get_temp_dir().$name); //obtain the contents of the file
$contents = addslashes($contents);
//put the file information and contents into the database
$s = "
UPDATE inventory
SET
inventory_file_blob = '$contents',
inventory_file_name = '$name',
inventory_file_type = '$type'
WHERE INVENTRORY_ID = '#RECORD_ID#'
";
nuRunQuery($s);
unlink(sys_get_temp_dir().$name); //delete the temporary file.
}____________________________________________________________________________________
Also the PHP Code: SHOW I found in the Sample Application has been modified accordingly:
____________________________________________________________________________________
$s = "
SELECT *
FROM inventory
WHERE INVENTRORY_ID = '#RECORD_ID#'
";
$t = nuRunQuery($s);
$r = db_fetch_object($t);
header("Content-Type: $r->inventory_file_type");
echo $r->inventory_file_blob;
____________________________________________________________________________________
It seems that I have two issues:
- Hitting the Save-Button gives me the message "Requested JSON parse failed." The table fields inventory_file_name and inventory_file_type get filled, but inventory_file_blob stays emty.
- After manually uploading the BLOB via phpMyAdmin it looks like in the Sample Application on my XAMPP

- like in the Sample Application
- like_Sample_Application.jpg (134.29 KiB) Viewed 12183 times
I hope to get some feedback to my two issues.
Thank you so much, it is a great application to me,
Timo