Just get the original filename?
Is there a way to get the uploaded file's original filename in
afterStateUpdated
of a FileUpload field? I want to keep the randomly-generated filename, but I want to get the original filename so I can $set()
the text of some other fields based on the original filename of the uploaded file.1 Reply
Found the solution myself.
You might want to make sure that the content of the state is a TemporaryUploadedFile and not a string. It does that sometimes.