Skip to content

Commit

Permalink
feat(Post download): show progress
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Mar 18, 2022
1 parent 00a4875 commit 2e2be99
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions components/pages/posts/post/PostDownload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ export default {
const PROXIED_MEDIA_URL = ProxyHelper.proxyUrl(this.mediaUrl);
const RESPONSE = await fetch(PROXIED_MEDIA_URL)
const RESPONSE = await this.$axios.get(PROXIED_MEDIA_URL, {
progress: true,
responseType: 'blob',
})
const RESPONSE_BLOB = await RESPONSE.blob()
const RESPONSE_BLOB = RESPONSE.data
const FILE_EXTENSION = RESPONSE.headers.get('content-type').split('/')[1]
const FILE_EXTENSION = RESPONSE.headers['content-type'].split('/')[1]
const FILE_NAME = this.mediaName + '.' + FILE_EXTENSION
Expand Down

0 comments on commit 2e2be99

Please sign in to comment.