Jump to content

Replacing file with identical filename problem


onjegolders
 Share

Recommended Posts

Hey guys,

Not sure if any of you have had this issue before but I have some file upload front-end forms where the client is able to add new files, replace, update etc.

Recently they have been having problems where some files when being replaced are failing (they become 0kb) - up until now I've been trying to figure out the pattern to produce this and it seems to be when replacing the existing file with a file with the exact same filename.

Can anyone think of a PW or PHP reason why this might cause a problem?

If not, I'm guessing it's something within the form code...

Thanks.

Link to comment
Share on other sites

Sorry very quick update. I think it may have something to do with setting file overwrite to true/false


Any chance it started happening after an upgrade to 2.5.1?

There's a new setting for replacing existing files - not really sure, but might be worth a look.

Thanks Adrian, I hadn't noticed that but am still on 2.4 on this install. I tried changing fileOverwrite to false and it seems to have sorted it. Strange as it is actually overwriting it?

Link to comment
Share on other sites

er, silly thought.

If the field is set to 1 file allowed, then it will replace one file with another, whatever that is.

The file overwrite is more about where you have a multi file upload and have a clash of names, I think.....

Of course, it is late and I have just been finishing a site off so I might be talking buzzcocks....

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...