File tree Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Expand file tree Collapse file tree 2 files changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -12,19 +12,12 @@ type Props = ShowPropertyProps & {
1212
1313const File : FC < Props > = ( { width, record, property } ) => {
1414 const { custom } = property as unknown as { custom : PropertyCustom }
15- const { provider } = custom
1615
17- let path = record ?. params [ custom . filePathProperty ]
16+ const path = record ?. params [ custom . filePathProperty ]
1817 if ( ! path ) {
1918 return null
2019 }
2120
22- if ( provider === 'local' && typeof path === 'string' && ! path . startsWith ( '/' ) ) {
23- // append / to the path when bucket is defined as a relative path
24- // which is in the case of Local adapter when bucket is 'public'
25- path = `/${ path } `
26- }
27-
2821 const name = custom . fileNameProperty
2922 ? record ?. params [ custom . fileNameProperty ]
3023 : record ?. params [ custom . keyProperty ]
Original file line number Diff line number Diff line change @@ -36,6 +36,6 @@ export default class LocalProvider extends BaseAdapter {
3636
3737 // eslint-disable-next-line class-methods-use-this
3838 public path ( key : string , bucket ?: string ) : string {
39- return path . join ( bucket || this . bucket , key )
39+ return `/ ${ path . join ( bucket || this . bucket , key ) } `
4040 }
4141}
You can’t perform that action at this time.
0 commit comments