fix some bug and upload dir
Merge branch 'media-manager'