<p>"Upload Location" doesn't reference you're environment variables. Instead, you've got a dropdown menu of your pre-defined Assets sources. Whichever one you choose will be used as the base of your file path.</p>

<p>Anything you put in curly braces after that will become a <em>subfolder</em> of that asset source. So your subfolder names will be created based on whichever <strong>Entry fields</strong> you define.</p>

<p><img src="https://i.sstatic.net/nXkBV.png" alt="Upload Location"></p>

CC BY-SA 3.0
2015-06-29T20:30:22.547Z
Ah, I see. I was confused by the placeholder text in that field, which is the same as the placeholder text in the server path field in _Assets_ settings. That makes more sense now.
Philip Jones
CC BY-SA 3.0
2015-06-29T20:27:48.083Z
2015-06-29T20:27:48.083Z
Lindsey D
<p>I created an environment variable (in <em>config/general.php</em>) called <code>{baseAssetPath}</code> which contains the server path to the folder where all my assets are stored. This makes it easier to populate the <em>Path</em> field in <em>Assets</em> settings.</p>

<p>However, this variable does not appear to work to configure the <em>Upload Location</em> when setting up an <em>Assets</em> field. Now, when I attempt to add an asset, or edit an existing entry, I get the following error.</p>

<pre><code>Internal Server Error

Craft\EntryModel and its behaviors do not
have a method or closure named
"baseAssetPath".
</code></pre>

<p>Is <em>Upload Location</em> looking for a server path or a URL path?</p>

<p>If it's looking for a server path, why doesn't my <code>{baseAssetPath}</code> variable work here?</p>

<assets><field><environmentvariables>
Environment variable doesn't work in Assets field settings
# Environment variable doesn't work in Assets field settings

(Asked by: username_0 on 2015-06-29)

I created an environment variable (in config/general.php) called {baseAssetPath} which contains the server path to the folder where all my assets are stored. This makes it easier to populate the Path field in Assets settings.
However, this variable does not appear to work to configure the Upload Location when setting up an Assets field. Now, when I attempt to add an asset, or edit an existing entry, I get the following error.
Internal Server Error

Craft\EntryModel and its behaviors do not
have a method or closure named
"baseAssetPath".

Is Upload Location looking for a server path or a URL path?
If it's looking for a server path, why doesn't my {baseAssetPath} variable work here?

**Tags:** assets, field, environmentvariables


---

## 1 answers

### Answer by username_1 on 2015-06-29. Score: 1 | Accepted answer

"Upload Location" doesn't reference you're environment variables. Instead, you've got a dropdown menu of your pre-defined Assets sources. Whichever one you choose will be used as the base of your file path.

Anything you put in curly braces after that will become a *subfolder* of that asset source. So your subfolder names will be created based on whichever **Entry fields** you define.

![Upload Location](https://i.sstatic.net/nXkBV.png)

> **Comments:**
> **username_0**: Ah, I see. I was confused by the placeholder text in that field, which is the same as the placeholder text in the server path field in _Assets_ settings. That makes more sense now.  

---

