File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
apps/frontend/src/components/media Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -88,18 +88,10 @@ export function useUppyUploader(props: {
88
88
// Expand generic types to specific ones
89
89
const expandedTypes = allowedTypes . flatMap ( ( type ) => {
90
90
if ( type === 'image/*' ) {
91
- return [
92
- 'image/png' ,
93
- 'image/jpeg' ,
94
- 'image/jpg' ,
95
- 'image/gif' ,
96
- ] ;
91
+ return [ 'image/png' , 'image/jpeg' , 'image/jpg' , 'image/gif' ] ;
97
92
}
98
93
if ( type === 'video/*' ) {
99
- return [
100
- 'video/mp4' ,
101
- 'video/mpeg' ,
102
- ] ;
94
+ return [ 'video/mp4' , 'video/mpeg' ] ;
103
95
}
104
96
return [ type ] ;
105
97
} ) ;
@@ -214,12 +206,11 @@ export function useUppyUploader(props: {
214
206
return ;
215
207
}
216
208
217
- console . log ( result ) ;
218
209
if ( transloadit . length > 0 ) {
219
210
// @ts -ignore
220
211
const allRes = result . transloadit [ 0 ] . results ;
221
212
const toSave = uniq < string > (
222
- allRes [ Object . keys ( allRes ) [ 0 ] ] . flatMap ( ( item : any ) =>
213
+ ( allRes [ Object . keys ( allRes ) [ 0 ] ] || [ ] ) . flatMap ( ( item : any ) =>
223
214
item . url . split ( '/' ) . pop ( )
224
215
)
225
216
) ;
You can’t perform that action at this time.
0 commit comments