The original filename is available from $upload->filename, you can parse the extension from that. Note that this filename can be literally anything the browser sends, some may even send a full Windows file path for example, or it's possible a client will not send a filename.
-Dan On Fri, Oct 12, 2018 at 2:11 PM Viktor Nacht <viktor.na...@gmail.com> wrote: > Just wondering if I'm missing anything for getting the file extension of > an uploaded file before it's been moved or slurped. Right now my approach > is to create Mojo::File object about the filename from Mojo::Upload and > extract it from there. Is there a more direct method I'm unaware of? > > Thanks! > > V > > -- > You received this message because you are subscribed to the Google Groups > "Mojolicious" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to mojolicious+unsubscr...@googlegroups.com. > To post to this group, send email to mojolicious@googlegroups.com. > Visit this group at https://groups.google.com/group/mojolicious. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to mojolicious+unsubscr...@googlegroups.com. To post to this group, send email to mojolicious@googlegroups.com. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.