<p>Your second example is easy enough... just make sure the <code>assets</code> folder exists under both of the <code>site1</code> and <code>site2</code> folders, the under your Asset Volume settings in the Control Panel, set the "File System Path" to the relative <code>assets</code>.</p>

CC BY-SA 3.0
2017-12-31T22:51:00.450Z
Thank you for your kind answer, but that's not easy for me. :-( I created the assets folders, so that I have "craft/web/site1/assets" and "craft/web/site2/assets", but what path do I use? I tried many and when I try to rebuild the cache, Craft says 'Impossible to create the root directory "/assets"'. I know Craft have writing privileges into the sites folders, so what I am missing here?
Braintrash
CC BY-SA 3.0
2017-12-31T22:55:09.220Z
Sorry, wasn't being condescending. Just meant that the first example is more complicated. :)
Brad Bell
CC BY-SA 3.0
2017-12-31T22:56:34.110Z
The path should be just `assets`.  When you set that, are you able to upload a file from the Control Panel?
Brad Bell
CC BY-SA 3.0
2017-12-31T23:05:22.580Z
Oh, I didn't think you were condescending, just too much familiar with Craft. ;-) I have some progress: I was mislead by Craft recommending me an absolute path (“/path/to/folder”) and I used "/assets" instead of just "assets". Index rebuilding is now working and I can upload files BUT they all go into the "site1/assets" folder.
Braintrash
CC BY-SA 3.0
2017-12-31T23:18:41.167Z
In your 2nd site's `index.php` file, did you define the `CRAFT_SITE` PHP constant?  i.e. `define('CRAFT_SITE', 'site2');` where `site2` is whatever th handle for your 2nd site is under Settings->Sites in the Control Panel.
Brad Bell
CC BY-SA 3.0
2017-12-31T23:23:33.073Z
Yes, I did exactly that from the start.
Braintrash
CC BY-SA 3.0
2017-12-31T22:46:44.540Z
2017-12-31T22:46:44.540Z
Brad Bell
<p>I think I got it right, going the first solution I planned. So, in my Craft project directory ("craft"), I created "craft/assets/site1" and "craft/assets/site2" and when going into the admin panel and setting up the ressources, using "../../assets/site1" and "../../assets/site2" did the trick, everything working as expected. So, really, my source of confusion here was Craft recommending me “/path/to/folder” which lead me to add a / at the beginning of my paths; once I got rid of that, problem was solved. Thank you very much for your help ! :-)</p>

CC BY-SA 3.0
2017-12-31T23:22:55.797Z
Glad you're all sorted!
Brad Bell
CC BY-SA 3.0
2017-12-31T23:24:38.213Z
Because you so kindly helped me. Thank you again for that! :-)
Braintrash
CC BY-SA 3.0
2017-12-31T23:22:09.587Z
2017-12-31T23:22:09.587Z
Braintrash
<p>I am a little bit confused by the documentation about assets. It says that paths are relatives from the directory that holds the index.php file. </p>

<p>Now, I am working on multisite, with the following folders:<br>
    craft/web/site1/<br>
    craft/web/site2/  </p>

<p>Is it possible to have:<br>
    craft/assets/site1/<br>
    craft/assets/site2/  </p>

<p>Or:<br>
    craft/web/site1/assets/<br>
    craft/web/site2/assets/</p>

CC BY-SA 3.0
2018-01-02T14:18:44.680Z
If you want your assets to be publicly available I think they would need to be under the `/web` directory.
Cavell Blood
<assets><craft3><multi-site>
Craft 3: multisite and assets
# Craft 3: multisite and assets

(Asked by: username_0 on 2017-12-31)

I am a little bit confused by the documentation about assets. It says that paths are relatives from the directory that holds the index.php file.

Now, I am working on multisite, with the following folders:  
craft/web/site1/  
craft/web/site2/

Is it possible to have:  
craft/assets/site1/  
craft/assets/site2/

Or:  
craft/web/site1/assets/  
craft/web/site2/assets/

**Tags:** assets, craft3, multi-site

> **Comments:**
> **username_1**: If you want your assets to be publicly available I think they would need to be under the `/web` directory.  

---

## 2 answers

### Answer by username_2 on 2017-12-31. Score: 1

Your second example is easy enough... just make sure the `assets` folder exists under both of the `site1` and `site2` folders, the under your Asset Volume settings in the Control Panel, set the "File System Path" to the relative `assets`.

> **Comments:**
> **username_0**: Thank you for your kind answer, but that's not easy for me. :-( I created the assets folders, so that I have "craft/web/site1/assets" and "craft/web/site2/assets", but what path do I use? I tried many and when I try to rebuild the cache, Craft says 'Impossible to create the root directory "/assets"'. I know Craft have writing privileges into the sites folders, so what I am missing here?  
> **username_2**: Sorry, wasn't being condescending. Just meant that the first example is more complicated. :)  
> **username_2**: The path should be just `assets`.  When you set that, are you able to upload a file from the Control Panel?  
> **username_0**: Oh, I didn't think you were condescending, just too much familiar with Craft. ;-) I have some progress: I was mislead by Craft recommending me an absolute path (“/path/to/folder”) and I used "/assets" instead of just "assets". Index rebuilding is now working and I can upload files BUT they all go into the "site1/assets" folder.  
> **username_2**: In your 2nd site's `index.php` file, did you define the `CRAFT_SITE` PHP constant?  i.e. `define('CRAFT_SITE', 'site2');` where `site2` is whatever th handle for your 2nd site is under Settings->Sites in the Control Panel.  
> **username_0**: Yes, I did exactly that from the start.  

---

### Answer by username_0 on 2017-12-31. Score: 1

I think I got it right, going the first solution I planned. So, in my Craft project directory ("craft"), I created "craft/assets/site1" and "craft/assets/site2" and when going into the admin panel and setting up the ressources, using "../../assets/site1" and "../../assets/site2" did the trick, everything working as expected. So, really, my source of confusion here was Craft recommending me “/path/to/folder” which lead me to add a / at the beginning of my paths; once I got rid of that, problem was solved. Thank you very much for your help ! :-)

> **Comments:**
> **username_2**: Glad you're all sorted!  
> **username_0**: Because you so kindly helped me. Thank you again for that! :-)  

---

