File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
packages/desktop-client/src Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,19 @@ global.Actual = {
100100 restartElectronServer : ( ) => { } ,
101101
102102 openFileDialog : async ( { filters = [ ] } ) => {
103+ const FILE_ACCEPT_OVERRIDES = {
104+ // Safari on iOS requires explicit MIME/UTType values for some extensions to allow selection.
105+ qfx : [
106+ 'application/vnd.intu.qfx' ,
107+ 'application/x-qfx' ,
108+ 'application/qfx' ,
109+ 'application/ofx' ,
110+ 'application/x-ofx' ,
111+ 'application/octet-stream' ,
112+ 'com.intuit.qfx' ,
113+ ] ,
114+ } ;
115+
103116 return new Promise ( resolve => {
104117 let createdElement = false ;
105118 // Attempt to reuse an already-created file input.
@@ -117,7 +130,15 @@ global.Actual = {
117130
118131 const filter = filters . find ( filter => filter . extensions ) ;
119132 if ( filter ) {
120- input . accept = filter . extensions . map ( ext => '.' + ext ) . join ( ',' ) ;
133+ input . accept = filter . extensions
134+ . flatMap ( ext => {
135+ const normalizedExt = ext . startsWith ( '.' )
136+ ? ext . toLowerCase ( )
137+ : `.${ ext . toLowerCase ( ) } ` ;
138+ const overrides = FILE_ACCEPT_OVERRIDES [ ext . toLowerCase ( ) ] ?? [ ] ;
139+ return [ normalizedExt , ...overrides ] ;
140+ } )
141+ . join ( ',' ) ;
121142 }
122143
123144 input . style . position = 'absolute' ;
Original file line number Diff line number Diff line change 1+ ---
2+ category : Bugfix
3+ authors : [dbequeaith]
4+ ---
5+
6+ Allows selection of quicken (qfx) files for import on safari mobile
You can’t perform that action at this time.
0 commit comments