Media module uploads error
When attempting to upload images via the Media module I'm getting an error seemingly when the file is moved from the temporary upload location to the public media directory. The exception flashes by quite quickly and I've had to take a screenshot in order to read it, but the important bits are as follows:
ErrorException in FileService.php line 38
fopen(): Filename cannot be empty
- at HandleExceptions->handleError('2', 'fopen(): Filename cannot be empty', 'C:\inetpub\localhost\test_project.com\Modules\Media\Services\FileService.php', '38', array('file' => object(UploadedFile), 'savedFile' => object(File), 'path' => 'public/assets/media/test_image.jpg'));
An obvious concern is the IIS server and the translation of htaccess to web.config, however, I've been developing on it for several weeks now and have had no other problems. This test project is a fresh installation with the latest modules and no customisation.
Has anyone else had this problem?
Update: Deployed the test project to an Ubuntu VM, works without issue.
Unsurprisingly, I suppose, the problem was due to permissions.
The send() method of the XmlHttpRequest in dropzone.js was generating a 500 error. After scrabbling about with every other possibility for longer than I care to admit, I decided to check the user role. Turns out Authentication was working correctly, but for reasons I haven't yet determined Authorisation was failing even though the app pool user role had full permissions to the site's directory. The solution was to connect explicitly using my own credentials.