2 * Implements hook_stream_wrappers().
4 function {{ machine_name }}_stream_wrappers() {
7 'name' => t('Public files'),
8 'class' => 'DrupalPublicStreamWrapper',
9 'description' => t('Public local files served by the webserver.'),
10 'type' => STREAM_WRAPPERS_LOCAL_NORMAL,
13 'name' => t('Private files'),
14 'class' => 'DrupalPrivateStreamWrapper',
15 'description' => t('Private local files served by Drupal.'),
16 'type' => STREAM_WRAPPERS_LOCAL_NORMAL,
19 'name' => t('Temporary files'),
20 'class' => 'DrupalTempStreamWrapper',
21 'description' => t('Temporary local files for upload and previews.'),
22 'type' => STREAM_WRAPPERS_LOCAL_HIDDEN,
25 'name' => t('Content delivery network files'),
26 'class' => 'MyModuleCDNStreamWrapper',
27 'description' => t('Files served by a content delivery network.'),
28 // 'type' can be omitted to use the default of STREAM_WRAPPERS_NORMAL
31 'name' => t('YouTube video'),
32 'class' => 'MyModuleYouTubeStreamWrapper',
33 'description' => t('Video streamed from YouTube.'),
34 // A module implementing YouTube integration may decide to support using
35 // the YouTube API for uploading video, but here, we assume that this
36 // particular module only supports playing YouTube video.
37 'type' => STREAM_WRAPPERS_READ_VISIBLE,