Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-06-19T05:59:57.410Z
Answers.LastActivityDate: 2017-06-19T05:59:57.410Z
Answers.UserDisplayName: dev barrierbreak
Body: <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>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-16T15:34:35.467Z
Comments.Text: Are you defining the site URL with the siteUrl config setting in `config/general.php` by chance?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-06-19T04:43:45.570Z
Comments.Text: No, have defined the siteURL in the Craft cms admin -> settings -> general screen.
Comments.UserDisplayName: dev barrierbreak
Tags: <assets><craft-pro><assetfilemodel>
Title: File upload error in MS Azure after custom domain was pointed to Azure server
ThreadText: # 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.
  
  
  ---
  
  