increase upload speed and fix photo deletion bug when app is force closed before upload is finished