Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

download file from a subform

Post Reply
johan
Posts: 392
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium

download file from a subform

Unread post 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);
mobilemcclintic
Posts: 54
Joined: Fri Oct 23, 2015 12:34 am

Re: download file from a subform

Unread post 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.
johan
Posts: 392
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium

Re: download file from a subform

Unread post 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 9711 times
Johan
johan
Posts: 392
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium

Re: download file from a subform

Unread post 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
toms
Posts: 785
Joined: Sun Oct 14, 2018 11:25 am

Re: download file from a subform

Unread post by toms »

You'd better ask your questions in the v4 Forum. V3 ist not supported anymore.
johan
Posts: 392
Joined: Sun Feb 27, 2011 11:16 am
Location: Belgium

Re: download file from a subform

Unread post by johan »

ok but this is a V3 issue.
I'm almost there. Only '#SUBFORM_RECORD_ID#' is not working in sql / php
Post Reply