Refactor the AWS upload policy code into a separate function. Simplify the createUploadControl() function using functional jQuery.