Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I am using the managed_file in a form to upload a file to Drupal. As you know Drupal saves the name of this file into its database and stores it in the path you give.

Unfortunately, when a user uploads a file which has the filename of a previously existing file, he receives an AJAX error that arises from SQL. Even though Drupal manages to store this file with a different name in the folder, I can't prevent the AJAX error.

Is there a solution for this?

Thanks.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.