File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { getMessageById } from '../database/services/Message';
1313import { getThreadMessageById } from '../database/services/ThreadMessage' ;
1414import database from '../database' ;
1515import { getThreadById } from '../database/services/Thread' ;
16+ import { headers } from './helpers/fetch' ;
1617
1718export type MediaTypes = 'audio' | 'image' | 'video' ;
1819export type TDownloadState = 'to-download' | 'loading' | 'downloaded' ;
@@ -271,7 +272,9 @@ export function downloadMediaFile({
271272 return reject ( ) ;
272273 }
273274 downloadKey = mediaDownloadKey ( downloadUrl ) ;
274- downloadQueue [ downloadKey ] = FileSystem . createDownloadResumable ( downloadUrl , path ) ;
275+ downloadQueue [ downloadKey ] = FileSystem . createDownloadResumable ( downloadUrl , path , {
276+ headers : headers as Record < string , string >
277+ } ) ;
275278 const result = await downloadQueue [ downloadKey ] . downloadAsync ( ) ;
276279
277280 if ( ! result ) {
You can’t perform that action at this time.
0 commit comments