Fix bug in https uploading and improve image thumb view