Page 1 of 1

download file from a subform

PostPosted: Thu Aug 31, 2017 11:41 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

PostPosted: Fri Sep 01, 2017 9:18 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

PostPosted: Fri Sep 01, 2017 4:04 pm
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 2105 times


Johan

Re: download file from a subform

PostPosted: Wed Mar 21, 2018 11:38 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

PostPosted: Thu Mar 22, 2018 1:49 am
by toms
You'd better ask your questions in the v4 Forum. V3 ist not supported anymore.

Re: download file from a subform

PostPosted: Thu Mar 22, 2018 3:09 am
by johan
ok but this is a V3 issue.
I'm almost there. Only '#SUBFORM_RECORD_ID#' is not working in sql / php