Custom function inside a CUSTOM BUTTON - BOOKS CUSTOM MODULE

Custom function inside a CUSTOM BUTTON - BOOKS CUSTOM MODULE

I am trying to upload the attachment in a custom module(Books) to a work drive.  One module is working, but another module(New) is not giving me the desired result as it is also giving an error. Of course, I changed the module name etc. Attaching the script and a screenshot of the error.