<p>I must have looked at the screen for too long. The problem was that I didn't use relative path and url settings.
<a href="https://craftcms.com/docs/3.x/sites.html#step-6-check-your-asset-volumes-settings" rel="nofollow noreferrer">https://craftcms.com/docs/3.x/sites.html#step-6-check-your-asset-volumes-settings</a></p>
<p>Here is a bit more of clarification @samroberts707 asked for:
If your base path is set to <code>@webroot/uploads</code>in Crafts Filesystem Settings then the Base-Url should be set to <code>uploads</code>, at least that is what I did.</p>

CC BY-SA 4.0
2023-01-03T18:00:07.377Z
Besides setting the base path URL, need to ensure owner is set to daemon:daemon
franklylately
CC BY-SA 4.0
2022-07-12T09:03:48.750Z
2022-08-19T09:27:46.403Z
2022-08-19T09:27:46.403Z
mcoze
<p>As mentioned in the title, I'm not able to upload any files in Craft4.
I created a filesystem and a volume which is connected to the filesystem. In the assets-field settings I added the volume. I have no idea what I'm doing wrong. For any help I would be grateful.
I'm using Craft v4.1.3</p>

CC BY-SA 4.0
2022-07-09T20:26:43.263Z
Is it local storage? Are you sure the volume has write permissions?
RomanAvr
CC BY-SA 4.0
2022-08-15T10:54:50.613Z
@mcoze Would you be able to elaborate more on your new settings? My base path is set to "@webroot/uploads" but I'm still getting the same error.
samroberts707
CC BY-SA 4.0
2022-08-19T09:29:19.027Z
I put a bit more of explanation in the anwer above, hope that helps
mcoze
<assets><craft4>
Craft4 stream_copy_to_stream(): Argument #2 ($to) must be of type resource, bool given
# Craft4 stream_copy_to_stream(): Argument #2 ($to) must be of type resource, bool given

(Asked by: username_0 on 2022-07-09)

As mentioned in the title, I'm not able to upload any files in Craft4.
I created a filesystem and a volume which is connected to the filesystem. In the assets-field settings I added the volume. I have no idea what I'm doing wrong. For any help I would be grateful.
I'm using Craft v4.1.3

**Tags:** assets, craft4
> **Comments:**
> **username_1**: Is it local storage? Are you sure the volume has write permissions?  
> **username_2**: @mcoze Would you be able to elaborate more on your new settings? My base path is set to "@webroot/uploads" but I'm still getting the same error.  
> **username_0**: I put a bit more of explanation in the anwer above, hope that helps  

---

## 1 answers

### Answer by username_0 on 2022-07-12. Score: 3 | Accepted answer

I must have looked at the screen for too long. The problem was that I didn't use relative path and url settings.
<https://craftcms.com/docs/3.x/sites.html#step-6-check-your-asset-volumes-settings>

Here is a bit more of clarification @samroberts707 asked for:
If your base path is set to `@webroot/uploads`in Crafts Filesystem Settings then the Base-Url should be set to `uploads`, at least that is what I did.

> **Comments:**
> **username_3**: Besides setting the base path URL, need to ensure owner is set to daemon:daemon  

---

