I was wondering what would be the osTicket default behavior if you implements my suggestion on your mod (same ref_id for all incoming records at os_ticket_attachment table), so i changed the database records by manually.
That´s it!!
After that, i was taking a look at your uploader.js code and trying to modify it in order to obtain that result but i could not do :(
I did the exact same thing earlier and was like waaahahah??!! That shouldn't work :)
So to dive into the .js a little bit, it uses just the standard POST http request to mimic the form on the scp/tickets.php page. The issue that I see is that the response doesn't include the ref_id anywhere for reference, nor can a function pass a forced ref_id value to the site, and also the built-in attachment uploader is only for a single file.
So I don't think it's as straightforward as I'd like it to be... totally doable by modding the php, but then I risk breaking my #1 Arbitrary Rule of being non-intrusive.
I have some other ideas though...