Skip to main content
deleted 22 characters in body
Source Link
J. Reynolds
  • 6.4k
  • 2
  • 17
  • 28

The Media Browser does not work with a physical path, but with the file managed table, and Drupal file system uses the uri of the file to get to the actual file on disk.

Go to the views settings page admin/structure/views/settings and turn on 'Show the SQL query'.

Then open up the media browser and look at the SQL query. It starts of with

SELECT file_managed.timestamp AS file_managed_timestamp, file_managed.fid AS fid, SUM(file_usage.count) AS file_usage_count
FROM 
{file_managed} file_managed

which means it is using the file_managed table as its base. That comes from the file module in Core. Looking at that table definition in PHPMyAdmin for instance will reveal a fid as the primary identifier, a filename, a uri, filemime and some other fields. The uri is the important part as it tells Drupal how to get to files.

I think that if you want to include files that reside on other systems you will need to include a The uri is prefixed by the stream wrapper for that file system. It is explained here(PHP classes that provide a common interface for getting to resources) and herethe two common Drupal ones are public:// and private://.

The media module already provides a remote internet sources wrapper, and Remote stream wrapper module provides a Remote Url plugin for the media module.

You can also write your own. Writing stream wrappers

The Media Browser does not work with a physical path, but with the file managed table, and Drupal file system uses the uri of the file to get to the actual file on disk.

Go to the views settings page admin/structure/views/settings and turn on 'Show the SQL query'.

Then open up the media browser and look at the SQL query. It starts of with

SELECT file_managed.timestamp AS file_managed_timestamp, file_managed.fid AS fid, SUM(file_usage.count) AS file_usage_count
FROM 
{file_managed} file_managed

which means it is using the file_managed table as its base. That comes from the file module in Core. Looking at that table definition in PHPMyAdmin for instance will reveal a fid as the primary identifier, a filename, a uri, filemime and some other fields. The uri is the important part as it tells Drupal how to get to files.

I think that if you want to include files that reside on other systems you will need to include a stream wrapper for that file system. It is explained here and here.

The media module already provides a remote internet sources wrapper, and Remote stream wrapper provides a Remote Url plugin for the media module.

The Media Browser does not work with a physical path, but with the file managed table, and Drupal file system uses the uri of the file to get to the actual file.

Go to the views settings page admin/structure/views/settings and turn on 'Show the SQL query'.

Then open up the media browser and look at the SQL query. It starts of with

SELECT file_managed.timestamp AS file_managed_timestamp, file_managed.fid AS fid, SUM(file_usage.count) AS file_usage_count
FROM 
{file_managed} file_managed

which means it is using the file_managed table as its base. That comes from the file module in Core. Looking at that table definition in PHPMyAdmin for instance will reveal a fid as the primary identifier, a filename, a uri, filemime and some other fields. The uri is the important part as it tells Drupal how to get to files. The uri is prefixed by the stream wrapper (PHP classes that provide a common interface for getting to resources) and the two common Drupal ones are public:// and private://.

The media module already provides a remote internet sources wrapper, and Remote stream wrapper module provides a Remote Url plugin for the media module.

You can also write your own. Writing stream wrappers

added 83 characters in body
Source Link
J. Reynolds
  • 6.4k
  • 2
  • 17
  • 28

The Media Browser does not work with a physical path, but with the file managed table, and Drupal file system uses the uri of the file to get to the actual file on disk.

Go to the views settings page admin/structure/views/settings and turn on 'Show the SQL query'.

Then open up the media browser and look at the SQL query. It starts of with

SELECT file_managed.timestamp AS file_managed_timestamp, file_managed.fid AS fid, SUM(file_usage.count) AS file_usage_count
FROM 
{file_managed} file_managed

which means it is using the file_managed table as its base. That comes from the file module in Core. Looking at that table definition in PHPMyAdmin for instance will reveal a fid as the primary identifier, a filename, a uri, filemime and some other fields. The uri is the important part as it tells Drupal how to get to files.

I think that if you want to include files that reside on other systems you will need to include a stream wrapper for that file system. It is explained here and here.

The media module already provides a remote internet sources wrapper, and there is a module called Remote stream wrapper that might helpprovides a Remote Url plugin for the media module.

The Media Browser does not work with a physical path, but with the file managed table, and Drupal file system uses the uri of the file to get to the actual file on disk.

Go to the views settings page admin/structure/views/settings and turn on 'Show the SQL query'.

Then open up the media browser and look at the SQL query. It starts of with

SELECT file_managed.timestamp AS file_managed_timestamp, file_managed.fid AS fid, SUM(file_usage.count) AS file_usage_count
FROM 
{file_managed} file_managed

which means it is using the file_managed table as its base. That comes from the file module in Core. Looking at that table definition in PHPMyAdmin for instance will reveal a fid as the primary identifier, a filename, a uri, filemime and some other fields. The uri is the important part as it tells Drupal how to get to files.

I think that if you want to include files that reside on other systems you will need to include a stream wrapper for that file system. It is explained here and here, and there is a module called Remote stream wrapper that might help

The Media Browser does not work with a physical path, but with the file managed table, and Drupal file system uses the uri of the file to get to the actual file on disk.

Go to the views settings page admin/structure/views/settings and turn on 'Show the SQL query'.

Then open up the media browser and look at the SQL query. It starts of with

SELECT file_managed.timestamp AS file_managed_timestamp, file_managed.fid AS fid, SUM(file_usage.count) AS file_usage_count
FROM 
{file_managed} file_managed

which means it is using the file_managed table as its base. That comes from the file module in Core. Looking at that table definition in PHPMyAdmin for instance will reveal a fid as the primary identifier, a filename, a uri, filemime and some other fields. The uri is the important part as it tells Drupal how to get to files.

I think that if you want to include files that reside on other systems you will need to include a stream wrapper for that file system. It is explained here and here.

The media module already provides a remote internet sources wrapper, and Remote stream wrapper provides a Remote Url plugin for the media module.

Source Link
J. Reynolds
  • 6.4k
  • 2
  • 17
  • 28

The Media Browser does not work with a physical path, but with the file managed table, and Drupal file system uses the uri of the file to get to the actual file on disk.

Go to the views settings page admin/structure/views/settings and turn on 'Show the SQL query'.

Then open up the media browser and look at the SQL query. It starts of with

SELECT file_managed.timestamp AS file_managed_timestamp, file_managed.fid AS fid, SUM(file_usage.count) AS file_usage_count
FROM 
{file_managed} file_managed

which means it is using the file_managed table as its base. That comes from the file module in Core. Looking at that table definition in PHPMyAdmin for instance will reveal a fid as the primary identifier, a filename, a uri, filemime and some other fields. The uri is the important part as it tells Drupal how to get to files.

I think that if you want to include files that reside on other systems you will need to include a stream wrapper for that file system. It is explained here and here, and there is a module called Remote stream wrapper that might help