{{filepicker1.file.type}}
is some __FILE_OBJECT_AS_JSON__
variable. So when I try to do anything with the Filepicker that might require the mimetype of that file (e.g. upload images to Firebase, etc.), I can’t get it…
Please fix this soon.
I ended up doing this which is insanely janky…
return "image/" + {{image_upload.file.name.split('.')[1]}}
inside a transformer.
Doesn’t file.name
produce an extensionless name? If it provides an extension, this is a nice workaround.
I haven’t touched this code in a minute but it seems to be still working
Hey @corysimmons and @alex-godin, just wanted to let you know that we’ve since added a contentType
property to the File Picker. So you can access the filetype with {{ filepicker1.file.contentType }}
. See example here:
Hope that helps!
1 Like