Fixed and optimized the fileuploadbutton script for post and comment editing