Media recovery binmode

- Use binary mode in doing media uploading/recovery
- Support automatic media recovery when the data is not available in the media buffer area