release buffer when uploading completely