Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

File URL

1,222 sites No security coverage
View on drupal.org

This module adds a field type for uploading local files or entering URLs to external files. It provides a widget to choose between these options and a formatter that displays a link to the file.

Description

File URL module provides a field type that allows either a file upload or entering a URL to an external file. The field type comes with a widget that allows the user to chose between the two options. A formatter is also provided that displays a link to the file.

Architecture

At the field type level, all files (both local and remote) get stored as a URIs. At the form level, a field widget takes care of either linking a remote file, or uploading one. When a local files is uploaded, it gets tracked by the {file_managed} table like any other file. The trick is that it gets transformed in a URI that contains the file ID, so it can be extracted later. When loading a file reference, the distinction between a local and remote file is made by a regex on the URI. On the display side, the URI simply gets rendered as a link. When the link generated by Drupal is accessed by a remote system, it needs to be able to resolve the referenced files. This is handled by issuing a redirect from the /file-dereference/{fid} to the actual path.

Activity

Total releases
1
First release
Jun 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 1
Maintenance
Dormant

Releases

Version Type Release date
2.0.0-alpha3 Pre-release Jun 18, 2025