servant-multipart
servant-multipart copied to clipboard
When file input is left blank, still a temporary file is created
I don't know if is intended that way. It confused me a bit. I guess I can check whether or not the user actually filled in the file input by check fdFileName.
Turns out that fdFileName even has a value that is not the empty string. How to check if a file input actually contains any file?
Turn out that fdFileName has the value "", i.e. a non-empty string with to quotes in it. The problem might be related to the fact that I am having two file inputs in my multipart form.
I also ran into this. checking for the value "" in fdFileName is also the method i came up with to check for this condition, but it feels unsound.