In a previous version of my administration panel I had file uploads working with Minio, but after an update this stopped working completely which made me look for an alternative. Because of this I started look for an alternative service. In the last few days I saw some [posts](https://x.com/gonedark/status/1978458884948775294) from [Jason McCreary](https://x.com/gonedark) about CloudFlare which made check if they had an s3 complaint object storage and they have one.
## Settings
I'll assume you've already setup your CloudFlare (CF) account and created a bucket. In addition to that bucket you will need to update the CORS settings for the bucket in question with the information below.
```yaml
"AllowedMethods": [
"GET",
"PUT",
"POST",
"DELETE",
"HEAD"
],
"AllowedHeaders": [
"*"
],
"ExposeHeaders": []
```
Apart from the CF settings you will need to change the following code within your `config/livewire.php` file.
Set the `temporary_file_upload.disk` value as `s3` in order to directly to CF or Amazon S3. In my case I am using the s3 configuration with [R2](https://www.cloudflare.com/developer-platform/products/r2/).
Within filament I make use of the spatie media library but this also works with the normal `FileUploadField`. See my code example below.
```php
SpatieMediaLibraryFileUpload::make('image')
->disk(config('filesystems.default'))
->visibility('private')
->fetchFileInformation(false)
->image(),
```
> Dit is een test
Inline Math
The quadratic formula is $$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$$ for solving $$ax^2 + bx + c = 0$$.
Euler's identity: $$e^{i\pi} + 1 = 0$$ combines five fundamental mathematical constants.
Block Math
The normal distribution probability density function:
$$ f(x) = \frac{1}{\sigma\sqrt{2\pi}} e^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2} $$
Summations and Integrals
The sum of the first $$n$$ natural numbers: $$\sum_{i=1}^{n} i = \frac{n(n+1)}{2}$$
Integration by parts: $$\int u , dv = uv - \int v , du$$
Interactive diagram rendering with manual control. Click the copy icon next to any Mermaid diagram to copy the code to your clipboard.
Simple Flowchart
```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Success]
B -->|No| D[Try Again]
D --> B
C --> E[End]
```
Process Flow
```mermaid
flowchart LR
A[User Input] --> B[Validate]
B --> C{Valid?}
C -->|Yes| D[Process]
C -->|No| E[Show Error]
D --> F[Save Result]
E --> A
F --> G[Complete]
```
API Sequence
```mermaid
sequenceDiagram
participant U as User
participant A as App
participant S as Server
U->>A: Click render
A->>S: API Request
S-->>A: Response
A-->>U: Show diagram
```
AI Models Overview
Modern AI models have revolutionized how we interact with technology. From language models to computer vision, these systems demonstrate remarkable capabilities.
Key Features
Benefits
Natural language understanding
Multi-modal processing
Real-time inference
Requirements
GPU acceleration
Model weights
API access
Architecture
Model Architecture
Insights
"The development of full artificial intelligence could spell the end of the human race." — Stephen Hawking
Learn more about AI safety and transformer architectures.