Answers.Body: <p>When determining the maximum upload file size, Craft <a href="https://github.com/pixelandtonic/Craft-Release/blob/master/app/variables/AppVariable.php#L209-L230" rel="noreferrer">first takes</a> the php.ini file <code>upload_max_filesize</code>, <code>post_max_size</code> and <code>memory_limit</code> into account by getting the minimum value and only then applying the Craft <a href="https://craftcms.com/docs/config-settings#maxUploadFileSize" rel="noreferrer"><code>maxUploadFileSize</code></a> config setting.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-29T00:02:37.573Z
Answers.Text: Is this still true for Craft 3? Does Craft always read the entire file into memory when uploading?
Answers.UserDisplayName: Simon East
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-22T14:40:13.773Z
Answers.Text: Yes. Just ran into this on a new site. memory_limit was set to 256, and that was the deciding factor in file size upload limit.
Answers.UserDisplayName: darylknight
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-30T21:16:12.947Z
Answers.LastActivityDate: 2017-06-30T21:16:12.947Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>Apparently, Craft requires <code>memory_limit</code> to also be set to max value, so setting <code>memory_limit</code> in <code>php.ini</code> did solve my problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-30T19:10:40.980Z
Answers.LastActivityDate: 2017-06-30T21:11:44.607Z
Answers.LastEditDate: 2017-06-30T21:11:44.607Z
Answers.UserDisplayName: Lukigi
Body: <p>I have run into a problem of file sizes maxing out on 256MB.</p>
  
  <p><strong>On PHP side I have</strong><br>
  <code>upload_max_filesize</code> &amp; <code>post_max_size</code> set to <code>1GB</code></p>
  
  <p>I've created a simple PHP script to test upload size and managed to upload 800MB file. So everything points to Craft having some limits.</p>
  
  <p><strong>In Craft CMS config file I have:</strong></p>
  
  <pre><code>'maxUploadFileSize'     =&gt; 1073741824
  </code></pre>
  
  <p>Yet if I try to upload files larger than 256MB I get a modal message saying file size exceeds 256MB.</p>
  
Tags: <assets><config><php><upload>
Title: Upload file size limits to 256MB
ThreadText: # Upload file size limits to 256MB
  
  (Asked by: username_0 on 2017-06-30)
  
  I have run into a problem of file sizes maxing out on 256MB.
  
  **On PHP side I have**  
  `upload_max_filesize` & `post_max_size` set to `1GB`
  
  I've created a simple PHP script to test upload size and managed to upload 800MB file. So everything points to Craft having some limits.
  
  **In Craft CMS config file I have:**
  
  ```
  'maxUploadFileSize'     => 1073741824
  
  ```
  
  Yet if I try to upload files larger than 256MB I get a modal message saying file size exceeds 256MB.
  
  **Tags:** assets, config, php, upload
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-06-30. Score: 7
  
  When determining the maximum upload file size, Craft [first takes](https://github.com/pixelandtonic/Craft-Release/blob/master/app/variables/AppVariable.php#L209-L230) the php.ini file `upload_max_filesize`, `post_max_size` and `memory_limit` into account by getting the minimum value and only then applying the Craft [`maxUploadFileSize`](https://craftcms.com/docs/config-settings#maxUploadFileSize) config setting.
  
  > **Comments:**
  > **username_2**: Is this still true for Craft 3? Does Craft always read the entire file into memory when uploading?  
  > **username_3**: Yes. Just ran into this on a new site. memory_limit was set to 256, and that was the deciding factor in file size upload limit.  
  
  ---
  
  ### Answer by username_0 on 2017-06-30. Score: 3
  
  Apparently, Craft requires `memory_limit` to also be set to max value, so setting `memory_limit` in `php.ini` did solve my problem.
  
  
  ---
  
  