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
<h2id="deploying-to-production"><aclass="heading-anchor" href="#deploying-to-production"><spanclass="heading-anchor-icon" aria-hidden="true">#</span></a>Deploying to production</h2>
989
-
<h3id="using-a-production-ready-storage-disk"><aclass="heading-anchor" href="#using-a-production-ready-storage-disk"><spanclass="heading-anchor-icon" aria-hidden="true">#</span></a>Using a production-ready storage disk</h3>
990
-
<p>Filament has a storage disk defined in the <ahref="#publishing-configuration">configuration</a>, which by default is set to <code>public</code>. You can set the <code>FILAMENT_FILESYSTEM_DISK</code> environment variable to change this.</p>
991
-
<p>The <code>public</code> disk, while great for easy local development, is not suitable for production. It does not support file visibility, so features of Filament such as <ahref="prebuilt-actions/export">exports</a> will create public files. In production, you need to use a production-ready disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the exported files.</p>
<p>Please note that this feature uses the Filament filesystem to store exported files. The disk used by the Filament filesystem is defined in the <ahref="../installation#publishing-configuration">configuration file</a>. By default, the disk is set to <code>public</code> for easy local development, so when using Filament exports in production, please make sure that you use a production-ready disk such as <code>s3</code> with a private access policy. You may also consider <ahref="#customizing-the-storage-disk">customizing the storage disk</a> for exports only.</p>
885
-
</blockquote>
886
883
<p>Filament v3.2 introduced a prebuilt action that is able to export rows to a CSV or XLSX file. When the trigger button is clicked, a modal asks for the columns that they want to export, and what they should be labeled. This feature uses <ahref="https://laravel.com/docs/queues#job-batching">job batches</a> and <ahref="../../notifications/database-notifications#overview">database notifications</a>, so you need to publish those migrations from Laravel. Also, you need to publish the migrations for tables that Filament uses to store information about exports:</p>
<h2id="configuring-the-export-filesystem"><aclass="heading-anchor" href="#configuring-the-export-filesystem"><spanclass="heading-anchor-icon" aria-hidden="true">#</span></a>Configuring the export filesystem</h2>
1148
1145
<h3id="customizing-the-storage-disk"><aclass="heading-anchor" href="#customizing-the-storage-disk"><spanclass="heading-anchor-icon" aria-hidden="true">#</span></a>Customizing the storage disk</h3>
1149
-
<p>By default, exported files will be uploaded to the storage disk defined in the <ahref="../installation#publishing-configuration">configuration file</a>, which is <code>public</code> by default. You can set the <code>FILAMENT_FILESYSTEM_DISK</code> environment variable to change this. In production, you need to use a production-ready disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the exported files.</p>
1146
+
<p>By default, exported files will be uploaded to the storage disk defined in the <ahref="../installation#publishing-configuration">configuration file</a>, which is <code>public</code> by default. You can set the <code>FILAMENT_FILESYSTEM_DISK</code> environment variable to change this.</p>
1147
+
<p>While using the <code>public</code> disk a good default for many parts of Filament, using it for exports would result in exported files being stored in a public location. As such, if the default filesystem disk is <code>public</code> and a <code>local</code> disk exists in your <code>config/filesystems.php</code>, Filament will use the <code>local</code> disk for exports instead. If you override the disk to be <code>public</code> for an <code>ExportAction</code> or inside an exporter class, Filament will use that.</p>
1148
+
<p>In production, you should use a disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the exported files.</p>
1150
1149
<p>If you want to use a different disk for a specific export, you can pass the disk name to the <code>disk()</code> method on the action:</p>
<h3id="using-a-production-ready-storage-disk"><aclass="heading-anchor" href="#using-a-production-ready-storage-disk"><spanclass="heading-anchor-icon" aria-hidden="true">#</span></a>Using a production-ready storage disk</h3>
1060
1060
<p>Filament has a storage disk defined in the <ahref="#publishing-configuration">configuration</a>, which by default is set to <code>public</code>. You can set the <code>FILAMENT_FILESYSTEM_DISK</code> environment variable to change this.</p>
1061
-
<p>The <code>public</code> disk, while great for easy local development, is not suitable for production. It does not support file visibility, so features of Filament such as <ahref="../actions/prebuilt-actions/export">exports</a> will create public files. In production, you need to use a production-ready disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the exported files.</p>
1061
+
<p>The <code>public</code> disk, while great for easy local development, is not suitable for production. It does not support file visibility, so features of Filament such as <ahref="../forms/fields/file-upload">file uploads</a> will create public files. In production, you need to use a production-ready disk such as <code>s3</code> with a private access policy, to prevent unauthorized access to the uploaded files.</p>
0 commit comments