Fixed some bugs with uploading.

Signed-off-by: Difegue <sugoi@cock.li>