<p>MS support team helped to resolve the issue. I will post the steps to be followed. </p>

<ol>
<li><p>In your CMS Admin, Under Assets source -> 
File system path: images/
URL: <a href="http://example.azurewebsites.net/images" rel="nofollow noreferrer">http://example.azurewebsites.net/images</a>
(Here the images directory is under public directory)</p></li>
<li><p>In Azure portal, Add the following App settings in Application setting of your App service:
key: WEBSITE_DYNAMIC_CACHE 
value: 0</p></li>
<li><p>Restart the Azure App service.</p></li>
</ol>

CC BY-SA 3.0
2017-06-19T05:59:57.410Z
2017-06-19T05:59:57.410Z
dev barrierbreak
<p>I am facing an issue with file uploads. I installed a new installation of Craft CMS on Microsoft Azure server. MS Azure assigns a default domain to your webapp like example.azurewebsites.net. 
So while the default domain was assigned, I uploaded few asset files (images) successfully. </p>

<p>Later we had a custom domain added to Azure like mydomain.org
Once the custom domain was mapped, I edited the SiteURL (in Settings -> General -> mydomain.org) to the custom domain.
Now I am unable to upload asset files. </p>

<p>The error log shown in the Craft CMS craft.log (from Server Info) is move_uploaded_file(): Filename cannot be empty (D:\serverpath\craft\app\assetsourcetypes\BaseAssetSourceType.php:170)</p>

<p>Can someone please help. </p>

CC BY-SA 3.0
2017-06-16T15:34:35.467Z
Are you defining the site URL with the siteUrl config setting in `config/general.php` by chance?
Brad Bell
CC BY-SA 3.0
2017-06-19T04:43:45.570Z
No, have defined the siteURL in the Craft cms admin -> settings -> general screen.
dev barrierbreak
<assets><craft-pro><assetfilemodel>
File upload error in MS Azure after custom domain was pointed to Azure server
# File upload error in MS Azure after custom domain was pointed to Azure server

(Asked by: username_0 on 2017-06-16)

I am facing an issue with file uploads. I installed a new installation of Craft CMS on Microsoft Azure server. MS Azure assigns a default domain to your webapp like example.azurewebsites.net.
So while the default domain was assigned, I uploaded few asset files (images) successfully.

Later we had a custom domain added to Azure like mydomain.org
Once the custom domain was mapped, I edited the SiteURL (in Settings -> General -> mydomain.org) to the custom domain.
Now I am unable to upload asset files.

The error log shown in the Craft CMS craft.log (from Server Info) is move\_uploaded\_file(): Filename cannot be empty (D:\serverpath\craft\app\assetsourcetypes\BaseAssetSourceType.php:170)

Can someone please help.

**Tags:** assets, craft-pro, assetfilemodel
> **Comments:**
> **username_1**: Are you defining the site URL with the siteUrl config setting in `config/general.php` by chance?  
> **username_0**: No, have defined the siteURL in the Craft cms admin -> settings -> general screen.  

---

## 1 answers

### Answer by username_0 on 2017-06-19. Score: 2 | Accepted answer

MS support team helped to resolve the issue. I will post the steps to be followed.

1. In your CMS Admin, Under Assets source ->
   File system path: images/
   URL: <http://example.azurewebsites.net/images>
   (Here the images directory is under public directory)
2. In Azure portal, Add the following App settings in Application setting of your App service:
   key: WEBSITE\_DYNAMIC\_CACHE
   value: 0
3. Restart the Azure App service.


---

