@@ -91,68 +91,107 @@ This is the contents of the published config file:
9191``` php
9292use Elegantly\Media\Jobs\DeleteModelMediaJob;
9393use Elegantly\Media\Models\Media;
94+ use Elegantly\Media\Models\MediaConversion;
95+ use Elegantly\Media\PathGenerators\UuidPathGenerator;
96+ use Elegantly\Media\UrlFormatters\DefaultUrlFormatter;
9497
9598return [
9699 /**
97- * The media model
98- * Define your own model here by extending \Elegantly\Media\Models\Media::class
100+ * The media model.
101+ * Define your own model here by extending \Elegantly\Media\Models\Media::class.
99102 */
100103 'model' => Media::class,
101104
102105 /**
103- * The path used to store temporary file copy for conversions
104- * This will be used with storage_path() function
106+ * The MediaConversion model.
107+ * Define your own model here by extending \Elegantly\Media\Models\MediaConversion::class.
108+ */
109+ 'media_conversion_model' => MediaConversion::class,
110+
111+ /**
112+ * The path used to store temporary file copies for conversions.
113+ * This will be used with the storage_path() function.
105114 */
106115 'temporary_storage_path' => 'app/tmp/media',
107116
108117 /**
109- * The default disk used for storing files
118+ * The default disk used for storing files.
110119 */
111120 'disk' => env('MEDIA_DISK', env('FILESYSTEM_DISK', 'local')),
112121
113122 /**
114123 * Determine if media should be deleted with the model
115- * when using the HasMedia Trait
124+ * when using the HasMedia Trait.
116125 */
117126 'delete_media_with_model' => true,
118127
119128 /**
120129 * Determine if media should be deleted with the model
121- * when it is soft deleted
130+ * when it is soft deleted.
122131 */
123132 'delete_media_with_trashed_model' => false,
124133
125134 /**
126- * Deleting a large number of media attached to a model can be time-consuming
127- * or even fail (e.g., cloud API error, permissions, etc.)
128- * For performance and monitoring, when a model with the HasMedia trait is deleted,
129- * each media is individually deleted inside a job.
135+ * Job class responsible for deleting media when the model is deleted.
136+ * This helps with performance and monitoring by queuing media deletions.
130137 */
131138 'delete_media_with_model_job' => DeleteModelMediaJob::class,
132139
133140 /**
134- * The default collection name
141+ * The default collection name assigned media.
135142 */
136143 'default_collection_name' => 'default',
137144
138145 /**
139- * Prefix for the generated path of files
140- * Set to null if you do not want any prefix
141- * To fully customize the generated default path, extend the Media model and override the generateBasePath method
146+ * The default URL formatter class.
147+ * Used when calling `$media->getUrl()`.
148+ */
149+ 'default_url_formatter' => DefaultUrlFormatter::class,
150+
151+ /**
152+ * The default path generator class.
153+ * Used when storing new files.
154+ */
155+ 'default_path_generator' => UuidPathGenerator::class,
156+
157+ /**
158+ * Prefix for the generated file path.
159+ * Set to null to disable the prefix.
160+ * Override the generateBasePath method in the Media model for full customization.
142161 */
143162 'generated_path_prefix' => null,
144163
145164 /**
146- * Customize the queue connection used when dispatching conversion jobs
165+ * Queue connection name to use when dispatching media conversion jobs.
147166 */
148167 'queue_connection' => env('QUEUE_CONNECTION', 'sync'),
149168
150169 /**
151- * Customize the queue used when dispatching conversion jobs
152- * null will fall back to the default Laravel queue
170+ * Queue name to use for media conversion jobs.
171+ * Set to null to use the default Laravel queue.
153172 */
154173 'queue' => null,
155174
175+ /**
176+ * Configuration for FFmpeg processing.
177+ */
178+ 'ffmpeg' => [
179+ /**
180+ * The binary path to the FFmpeg executable.
181+ */
182+ 'ffmpeg_binaries' => env('FFMPEG_BINARIES', 'ffmpeg'),
183+
184+ /**
185+ * The binary path to the FFprobe executable.
186+ */
187+ 'ffprobe_binaries' => env('FFPROBE_BINARIES', 'ffprobe'),
188+
189+ /**
190+ * Optional log channel for FFmpeg operations.
191+ * Set to null to disable logging.
192+ */
193+ 'log_channel' => null,
194+ ],
156195];
157196```
158197
0 commit comments