File tree Expand file tree Collapse file tree 5 files changed +6
-2
lines changed Expand file tree Collapse file tree 5 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ window.sessionFeatureFlags = {
67
67
showPopoverAnchors : false ,
68
68
proAvailable : ! isEmpty ( process . env . SESSION_PRO ) ,
69
69
mockUserHasPro : ! isEmpty ( process . env . SESSION_HAS_PRO ) ,
70
+ fsTTL30s : ! isEmpty ( process . env . FILE_SERVER_TTL_30S ) ,
70
71
debug : {
71
72
debugLogging : ! isEmpty ( process . env . SESSION_DEBUG ) ,
72
73
debugLibsessionDumps : ! isEmpty ( process . env . SESSION_DEBUG_LIBSESSION_DUMPS ) ,
Original file line number Diff line number Diff line change @@ -775,7 +775,6 @@ export class MessageModel extends Model<MessageAttributes> {
775
775
( this . get ( 'attachments' ) || [ ] ) . map ( loadAttachmentData )
776
776
) ;
777
777
const body = this . get ( 'body' ) ;
778
-
779
778
const quoteWithData = await loadQuoteData ( this . get ( 'quote' ) ) ;
780
779
const previewWithData = await loadPreviewData ( this . get ( 'preview' ) ) ;
781
780
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ export const uploadFileToFsWithOnionV4 = async (
38
38
endpoint : POST_GET_FILE_ENDPOINT ,
39
39
method : 'POST' ,
40
40
timeoutMs : 30 * DURATION . SECONDS , // longer time for file upload
41
+ headers : window . sessionFeatureFlags . fsTTL30s ? { 'X-FS-TTL' : '30' } : { } ,
41
42
} ) ;
42
43
43
44
if ( ! batchGlobalIsSuccess ( result ) ) {
Original file line number Diff line number Diff line change @@ -486,11 +486,13 @@ async function sendBinaryViaOnionV4ToFileServer({
486
486
bodyBinary,
487
487
abortSignal,
488
488
timeoutMs,
489
+ headers = { } ,
489
490
} : WithTimeoutMs &
490
491
WithAbortSignal & {
491
492
endpoint : string ;
492
493
method : string ;
493
494
bodyBinary : Uint8Array ;
495
+ headers ?: Record < string , string | number > ;
494
496
} ) : Promise < OnionV4JSONSnodeResponse | null > {
495
497
if ( ! endpoint . startsWith ( '/' ) ) {
496
498
throw new Error ( 'endpoint needs a leading /' ) ;
@@ -502,7 +504,7 @@ async function sendBinaryViaOnionV4ToFileServer({
502
504
builtUrl ,
503
505
{
504
506
method,
505
- headers : { } ,
507
+ headers,
506
508
body : bodyBinary ,
507
509
useV4 : true ,
508
510
} ,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export type SessionFeatureFlags = {
13
13
debugInputCommands : boolean ;
14
14
proAvailable : boolean ;
15
15
mockUserHasPro : boolean ;
16
+ fsTTL30s : boolean ;
16
17
} ;
17
18
18
19
export type SessionFeatureFlagKeys = RecursiveKeys < SessionFeatureFlags > ;
You can’t perform that action at this time.
0 commit comments