implement local upload cache with local storage