You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``Media`` placed on a disk located elsewhere will throw an exception.
75
+
76
+
::
77
+
78
+
<?php
79
+
'disks' => [
80
+
'private' => [
81
+
'driver' => 'local',
82
+
'root' => storage_path('private'),
83
+
],
84
+
]
85
+
86
+
//...
87
+
88
+
$media->getUrl(); // Throws a Plank\Mediable\Exceptions\MediableUrlException
89
+
90
+
If you are using symbolic links to make local disks accessible, you can instruct the package to generate URLs with the ``'visibility' => 'public'`` key. By default, the package will assume that the symlink is named ``'storage'``, as per `laravel's documentation <https://laravel.com/docs/5.3/filesystem#the-public-disk>`_. This can be modified with the ``'prefix'`` key.
Permissions for S3-based disks is set on the buckets themselves. You can inform the package that ``Media`` on an S3 disk can be linked by URL by adding the ``'visibility' => 'public'`` key to the disk congfig.
@@ -56,6 +137,7 @@ The `config/mediable.php` offers a number of options for configuring how media u
56
137
57
138
::
58
139
140
+
<?php
59
141
//...
60
142
/*
61
143
* The maximum file size in bytes for a single uploaded file
@@ -106,10 +188,11 @@ Aggregate Types
106
188
107
189
Laravel-Mediable provides functionality for handling multiple kinds of files under a shared aggregate type. This is intended to make it easy to find similar media without needing to constantly juggle multiple MIME types or file extensions.
108
190
109
-
The package defines a number of common file types in the config file (config/mediable.php). Feel free to modify the default types provided by the package or add your own. Each aggregate type requires a key used to identify the type and a list of MIME types and file extensions that should be recognized as belonging to that aggregate type. For example, if you wanted to add an aggregate type for different types of markup, you could do the following.
191
+
The package defines a number of common file types in the config file (``config/mediable.php``). Feel free to modify the default types provided by the package or add your own. Each aggregate type requires a key used to identify the type and a list of MIME types and file extensions that should be recognized as belonging to that aggregate type. For example, if you wanted to add an aggregate type for different types of markup, you could do the following.
110
192
111
193
::
112
194
195
+
<?php
113
196
//...
114
197
'aggregate_types' => [
115
198
//...
@@ -145,6 +228,7 @@ The ``config/mediable.php`` file lets you specify a number of classes to be use
0 commit comments