Forums

Put download link for uploaded file in database

moontear 05 Jan, 2008
Hello,

sorry for posting two topics, but they are very different.

Uploading files works like a charm, the thing is that its hard to distinguish who uploaded what.

How do I create a backlink in the database to the uploaded file. Let's say the user uploaded "test.pdf" how is it possible to link this in the table to http://www.test.com/test.pdf?

moon
GreyHead 05 Jan, 2008
Hi moon,

It's better to post a new thread for anew topic thank you.

Please see message #2712 near the beginning of this thread Does that do what you want?

Bob
moontear 05 Jan, 2008
Exactly. Thank you.
mkukreja 12 Jan, 2008
I am new to chronoforms. Is it possible to send me the chronoform sample that uploads a file?
moontear 12 Jan, 2008
It's very easy.

The simplest example would be to put the following code into the "Form HTML" in the Form Code of your form:

<input type="file" name="uploadedfile" id="uploadedfile" />


This creates a standard upload field and the uploaded file will be put into the /components/com_chronocontact/upload/ directory given that it has the correct permissions (CHMOD 777).
GreyHead 12 Jan, 2008
Hi mjukreja,

moontear has got most of it, you also need to do this :

In the General tab put enctype='multipart/form-data' in the Form Tag attachment field.

See this FAQ for more info.

Bob
moontear 12 Jan, 2008
True, and also fill out the File Uploads tab - but the FAQ explains it all.
This topic is locked and no more replies can be posted.