Added media item fields support for uploading media from javascript.