File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,6 +101,20 @@ export const useUploadOptionsStore = create<UploadOptionsStore>()(
101101 } ) ,
102102 {
103103 name : 'zipline-upload-options' ,
104+ merge : ( persistedState : any , currentState ) => {
105+ return {
106+ ...currentState ,
107+ ...persistedState ,
108+ options : {
109+ ...currentState . options ,
110+ ...persistedState ?. options ,
111+ } ,
112+ ephemeral : {
113+ ...currentState . ephemeral ,
114+ ...persistedState ?. ephemeral ,
115+ } ,
116+ } ;
117+ } ,
104118 } ,
105119 ) ,
106120 ) ,
Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ export function applyUploadHeaders(
7575 options . format !== 'default' && req . setRequestHeader ( 'x-zipline-format' , options . format ) ;
7676 options . imageCompressionPercent &&
7777 req . setRequestHeader ( 'x-zipline-image-compression-percent' , options . imageCompressionPercent . toString ( ) ) ;
78- options . imageCompressionFormat !== 'default' &&
78+ options . imageCompressionFormat &&
79+ options . imageCompressionFormat !== 'default' &&
7980 req . setRequestHeader ( 'x-zipline-image-compression-type' , options . imageCompressionFormat ) ;
8081 options . maxViews && req . setRequestHeader ( 'x-zipline-max-views' , options . maxViews . toString ( ) ) ;
8182 options . addOriginalName && req . setRequestHeader ( 'x-zipline-original-name' , 'true' ) ;
You can’t perform that action at this time.
0 commit comments