This isn't about having multiple 'action' attributes on the form tag, so I would suggest you rename the thread to avoid confusion.
It's really quite simple. First of all, you need to make sure you have an attribute in your form HTML tag called "enctype" with value "multipart/form-data". That will allow uploads to go ahead.
Then, when you've checked if the form has been sent, you have full control over where you move their files to. There is no reason whatsoever that I can think of that you'd want to rename the files to anything special, because they're being saved in the database.
So all you really need to do is give them a completely random name, and anyone who wants to access them could access them by getting the filename from the database based on a given clause.
The first thing you really, really need to do is just play around with file uploading. No book, forum post or tutorial will give you a complete understanding of how to use everything, just like words cannot help someone to ride a bike. You need to try it out, play around with it and see what it can do and THEN work out how to implement it.