servant-multipart icon indicating copy to clipboard operation
servant-multipart copied to clipboard

When file input is left blank, still a temporary file is created

Open rubenmoor opened this issue 4 years ago • 3 comments
trafficstars

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.

rubenmoor avatar Dec 17 '20 03:12 rubenmoor

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?

rubenmoor avatar Dec 17 '20 17:12 rubenmoor

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.

rubenmoor avatar Dec 17 '20 17:12 rubenmoor

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.

tfc avatar Apr 29 '21 14:04 tfc