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?

1 Answer 1


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


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 Jun 24, 2016 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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