0

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!

3
  • This sounds like an Assets bug to me. Have you contacted Pixel & Tonic support? – Derek Hogue Jul 16 '15 at 14:56
  • Hi Rob, I've also taken the liberty of tagging your OP with the pixel and onic tag. A number of the P&T guys are active on here so this might get you noticed by them quicker! – Blatant Jul 16 '15 at 15:53
  • Thanks, guys! I will separately e-mail P&T and post here if I get an answer. – Rob Jul 20 '15 at 17:52

Your Answer

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

Browse other questions tagged or ask your own question.