Page 1 of 1

download file from a subform

Posted: Thu Aug 31, 2017 4:11 pm
by johan
Hi

I've created a form in Nubuilder with a subform where I upload my files (blob).
This works fine but how can I download the files from database? I've tried to add a button in the subform with event onclick but nothing happens.
Any idea or is there an example in demo of Nubuilder?

Code: Select all

$s = "
SELECT

sfi_type AS file_type,
sfi_description AS file_name,
sfi_blob AS file_blob
FROM dropzonetable
WHERE zzzsys_file_id = '#SUBFORM_RECORD_ID#'

";

nuDownloadFile('', $s);

Re: download file from a subform

Posted: Fri Sep 01, 2017 1:48 am
by mobilemcclintic
Just an assumption,
but did you use onclick to run nuRunPHP(pCode) and a related PHP procedure?

The display object for showing pictures on the online demo calls a PHP code to run the query.

look at demo.nubuilder.net and check out the product/services form.

Re: download file from a subform

Posted: Fri Sep 01, 2017 8:34 am
by johan
Hi
Every form can have more attachments (files). In the example the picture is on the form, not the subform.
I need a subform with on every row the name of the document and a button to download that attachement.
bijlage.PNG
bijlage.PNG (5.87 KiB) Viewed 9716 times
Johan

Re: download file from a subform

Posted: Wed Mar 21, 2018 3:08 pm
by johan
Hi
I'm still searching for a solution on this.
I have a subform with a file in every row of the subform. Just don't know how to download the files again, using a button.

Thanks for your support.
Johan

Re: download file from a subform

Posted: Wed Mar 21, 2018 5:19 pm
by toms
You'd better ask your questions in the v4 Forum. V3 ist not supported anymore.

Re: download file from a subform

Posted: Wed Mar 21, 2018 6:39 pm
by johan
ok but this is a V3 issue.
I'm almost there. Only '#SUBFORM_RECORD_ID#' is not working in sql / php