Added fix for uploading media