So it turns out my error was in how setUploadSuccessParams
works. I assumed that it updated the upload success params, but in fact it replaces all the upload success params.
In my code I was initially setting some params (such as a users id in our database), and then later trying to add the expiry date. It turns out I have to set all params at the same time (when I was adding the expiry date).
Thank you for all the help on this one!