Answers.Body: <p>Check the file permissions on your uploads directory. The apache/nginx user or group should have write permission.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-20T14:27:00.200Z
Answers.LastActivityDate: 2023-01-20T14:27:00.200Z
Answers.UserDisplayName: Wallace
Body: <p>When I upload image in server I get <a href="https://i.sstatic.net/E1rfA.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/E1rfA.png" alt="enter image description here" /></a>:</p>
  <pre><code>stream_copy_to_stream(): Argument #2 ($to) must be of type resource, bool given
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-21T17:05:01.027Z
Comments.Text: Hi @user13498! Is [this issue](https://craftcms.stackexchange.com/questions/39643/craft4-stream-copy-to-stream-argument-2-to-must-be-of-type-resource-bool) relevant? If not, could you detail what you’re uploading to and how it’s configured?
Comments.UserDisplayName: Matt Stein
Tags: <image><upload>
Title: Upload Image in Craft CMS on Server
ThreadText: # Upload Image in Craft CMS on Server
  
  (Asked by: username_0 on 2022-09-21)
  
  When I upload image in server I get [![enter image description here](https://i.sstatic.net/E1rfA.png)](https://i.sstatic.net/E1rfA.png):
  
  ```
  stream_copy_to_stream(): Argument #2 ($to) must be of type resource, bool given
  
  ```
  
  **Tags:** image, upload
  
  > **Comments:**
  > **username_1**: Hi @username_0! Is [this issue](https://craftcms.stackexchange.com/questions/39643/craft4-stream-copy-to-stream-argument-2-to-must-be-of-type-resource-bool) relevant? If not, could you detail what you’re uploading to and how it’s configured?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2023-01-20. Score: 1
  
  Check the file permissions on your uploads directory. The apache/nginx user or group should have write permission.
  
  
  ---
  
  