I'm a drupal newbie so excuse me if I'm using the incorrect terminology or my description is not very clear. I have a webform with a file upload field using the File widget. I upload files for users to download. When I upload a file to the webform and save the page, drupal adds a _X (where X is a number) to the file name just before the extension. For e.g if I upload myfile.tgz, drupal renames the file myfile_0.tgz. This can be quite annoying especially for tar files that auto install because users have to rename the files manually after downloading. I have gone to 'Administration-->Content Types-->Webform-->Manage Fields-->File' to make sure all the extensions I want to allow (tgz, tar.gz etc.) are enabled but this doesn't prevent the renaming. This happens even when there's no file with the same name already existing. How can I prevent this?

  • 1
    In my experience, this only happens if a copy of the file already exists on the server. What you are seeing surprises me. For hints you might start with File Uploading and Managing on Drupal Groups. It is a pretty comprehensive summary of what is available. – Triskelion Apr 11 '13 at 17:49
  • Thanks for the comments guys. I have confirmed it does happen when a copy does not already exist. Unfortunately I don't have access to the drupal server. I did find this module - Upload File Replace but that did not seem to work for me either. – JavaDev Apr 15 '13 at 16:56
  • Just to add that I found this and the second suggestion worked for me. – JavaDev Apr 15 '13 at 17:10

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.