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.

  • Are you defining the site URL with the siteUrl config setting in config/general.php by chance?
    – Brad Bell
    Jun 16, 2017 at 15:34
  • No, have defined the siteURL in the Craft cms admin -> settings -> general screen. Jun 19, 2017 at 4:43

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.