# 檔案上傳

##### Storage Options

編輯 .env

```
STORAGE_TYPE=local_secure
```

其他不同類型的儲存方式

- local
- s3

##### Changing Upload Limits

PHP

```
post_max_size = 20M
upload_max_filesize = 20M
```

Nginx

<p class="callout info"> 如果使用官方教學的 Docker 方式安裝，不需要再設定 Nginx。</p>

```
http {
	#...
        client_max_body_size 100m;
        client_body_timeout 120s; # Default is 60, May need to be increased for very large uploads
	#...
}
```

Cloudflare (optional)

如果有用 [Cloudflare](https://www.cloudflare.com) 作為 Reverse Proxy，還需要檢查 Cloudflare 的設定

Your-Domain &gt; Network &gt; Maximum Upload Size

[![cloudflare-upload.png](http://www.osslab.tw:8880/uploads/images/gallery/2020-06/scaled-1680-/cloudflare-upload.png)](http://www.osslab.tw:8880/uploads/images/gallery/2020-06/cloudflare-upload.png)