1

How can I get just the url of the uploaded file from the Views module 'file' field. If I do the following:

print $view->render_field('field_url', $id);

I get the entire 'file' object in html format. How can I retrieve just the url of the uploaded file?

0

If you use the Image URL Module module you can set the field to 'Image URL' format and call it with

$fields["field_name"]->content

and it should only output the url to the image without any surrounding html

  • Thanks for the response, but I'm referring to the 'file' field which is different than the 'image' field – JordanBarber Jun 24 '16 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.