This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
dleee59417
Hello! I use the Media finder, when saving to the Database, the value looks like "/test.png", how can I bring the value to this form "test"?
test_logo:
label: 'Media finder'
mode: image
imageWidth: '300'
imageHeight: '300'
span: auto
type: mediafinder
daftspunky
Hey dleee,
The value test
is not a valid file path and would break the media finder when viewing the image. You could manipulate the string using the pathinfo
PHP function, like so
pathinfo('/test.png')['filename']; // Output: test
I hope this helps.
1-2 of 2