File upload - save file link to .csv...

User 2395225 Photo


Registered User
10 posts

Currently my form will upload files just fine, and when it inputs the data into the .csv it just puts in the file name. Is there a way to have WFB modify what it sends to the .csv so that it includes a link to the file instead of just the file name itself?

I have a script that is calling up the CSV and displaying it in a sortable table right now, but I'd like the attachments column to contain the code to link to the file so a user can open up the attachments directly from the webpage.

So, instead of the .csv looking like this: xxx,123,filename.doc,555 it would like something like
xxx,123,<A HREF= “filename.doc”>filename</A>,555
Can WFB insert that extra bit before writing to the csv?

Thanks!
User 464893 Photo


Ambassador
1,611 posts

WFB does give you a chance to rename the csv file, whether it will accept that you will have to try.
The csv file is just that a file usually if I recall [.../formName/storage/csv/csv_name] is the link. Although that is a download. You may be able to use a hidden field with that information saved in the file but it would have to be extracted to use.
The Guy from OZ


User 2395225 Photo


Registered User
10 posts

I can link to the CSV file just fine, I just wanted to know if I can change what WFB puts into that csv, before it writes to the file. When an attachment is uploaded, the attachment filename is written to the csv...I want to see if WFB can modify that to add the link HTML around the filename, instead of just the file name.

My form is at http://ryanwebb.site90.net/requests.html

once someone inputs data and uploads a file, they can look at the 'active requests' link - and see the csv file output back onto the screen...the file name field shown on the screen I would like to make linkable (the email one too, for that matter).

I'm not sure if i'm making sense or not, I'm definitely not a software guy, but thanks for the help regardless :)

User 464893 Photo


Ambassador
1,611 posts

I think I see what you are after. Have a look at the demo's I put up below. PHP Snippets

All scripts use the csv file and display in different ways. Not totally what you are after but the method can be changed to suit. The problem is I used a script to do it. WFB is at this stage a one way device Input and save.
I can offer assistance but you will need a specialised script to do exactly what you want.
The Guy from OZ



Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.