I have everything working fine with Webform MySQL Views/Data/Elements and have created a nice view of my webform results. However, two of the values are for files that are uploaded when the form is submitted, and the View only shows a string of numbers that is presumably the file size instead a link to the file. I realize that this just a flat file but is there a way to automatically have a link to the uploaded file display, like in the regular webform results table? Looked all over google and the issue queue and did not see this one.

thanks

Gary

Comments

cafuego’s picture

Version: 6.x-1.2 » 6.x-2.x-dev
Assigned: Unassigned » cafuego
Category: support » feature

I don't think there's support for that in the current release, I've definitely never come across it and there's no special case for file fields in the code.

I'll need to have a little play and see how webform stores and references the uploaded file. I've changed the support request to a feature request. If I can add it in, I'll do so for the 6.x-2.x branch.

cafuego’s picture

Status: Active » Needs review

I've added tentative support for accessing uploaded files in the 6.x-2.x branch. You can try it out by grabbing the code via git or by waiting until drupal.org bakes a new 6.x-2.x-dev version of the module.

broyhill’s picture

thanks cafuego I will check it out!

hrodrig’s picture

Version: 6.x-2.x-dev » 7.x-1.0

Very interested in this feature in the Drupal 7 version!

joecorall’s picture

Assigned: cafuego » joecorall
Status: Needs review » Active

I'll take a look at the 6.x-2.x branch, and integrate this into 7.x asap

aisamat’s picture

Very interested in this feature in the Drupal 7 version too!

Would we be able to show uploaded images in a form throught a view? That's great!

kevinwalsh’s picture

+1 for flattening the file_managed table into the mysql view! Thanks for the great module.

rudy2342’s picture

Did this get integrated into 7.x? Because I'm having this problem

cafuego’s picture

This did not get added in to 7.x. The current D7 version of webform already exposes its data to views, so this module shouldn't even be needed.

akshita’s picture

Issue summary: View changes

@joe.corall

I have the same issue the webform mysql view is not displaying the uploaded file name and path rather displays only the uploaded file ID.

Is there anyway we can display the uploaded file name and path in the view.

Any help is appreciated.

Thanks in advance.

cafuego’s picture

@Akshita; In your view you should be able to create a relationship to the files table. Doing that will expose all the extra information about the uploaded files.

akshita’s picture

@cafuego.

Thank you for the quick turn around. Can you please give an example?

strainyy’s picture

This must be a bug? An ID is almost useless here unless you're expected to manually set up a relationship with the files table. Is it worth me committing a "fix" to automatically append the public path to the file?

Strainy

strainyy’s picture

Actually, in hindsight I can just do this manually. The data tables work-around for views should work fine.