I am using an Assets field for a single file upload to Amazon S3 in a Channel Form, with the simple form input code:
<input type="file" name="comment_attachment">
<input type="hidden" name="comment_attachment_source" value="2">
(My field name is comment_attachment
.)
This works perfectly for files whose filenames do not already exist in the destination folder. However, when I attempt to upload a file that shares the same name as an existing file, I get the following error:
Fatal error: Call to a member function getName() on a non-object in /[...]/system/expressionengine/third_party/assets/sources/base_source.php on line 656
The desired functionality would be an automatic rename to add an integer to the filename to differentiate it from other files of the same name.
I've verified the same error is taking place on my development (MAMP) and production (Rackspace Cloud Sites) environments.
EE 2.9.2, Assets 2.5, PHP 5.5.1 (dev) and 5.3.2 (production).
Thanks for any help you can offer!