You need to sign in to do that
Don't have an account?

Issues attaching multiple files
I have a Visualforce form used in Sites to submit new Cases. The form allows people to attach files to the new Case and has been in production working for about 6 months. In the last couple weeks, suddenly people are receiving errors when attaching more than 2 files, even though this previously worked and the code hasn't been updated.
In my testing, I don't receive an explicit error message but I am finding that if I attach more than 2 files, only the first and last one that's inserted in the code ends up saved on the Case. So if I select 5 files, only 1 and 5 are saved. When I review the debug log, it's as if the files in the middle don't even exist, there's no record of the code even trying to insert them, and there's no error messages.
This isn't a view state error, the page correctly gives an error message if any of the files are too big, I've tried re-writing the actual attachment insert code a few different ways, and the result is always the same- only the first and last files are saved. Has anyone else experienced similar issues recently? Since this worked perfectly well before, this is striking me as a bug on the Salesforce side of things, but I'm not sure how to convince support of this so they don't automatically close my help desk case. I'm sadistically hoping others have hit this as well as evidence for my claim.
Here are a couple ways I've tried handling inserting the attachments, both result in the issue I described.
Method 1-
Method 2-
I know this second method isn't very efficient, but I was trying to track down exactly where things were going wrong, unsuccessfully.