-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partinfo field "partFileName" is a Maybe, but is never Nothing? #159
Comments
I just ran into this, and it seems very wrong... This issue has obviously been open for a while - is there a specific design reason for this, or is it a bug (that should be fixed)? |
It's probably a bug -- please send a minimal server exhibiting the problem along with instructions for reproduction. |
@gregorycollins Here's a repository containing a server that exhibits the problem: https://github.com/dbp/snap-upload-blank-example To reproduce, build and run the server, then visit the index, and hit submit without setting a file. It will print, to the console:
Which I believe should instead be:
|
I think this is fixed in Digestive Functors since https://github.com/jaspervdj/digestive-functors/pull/125/files (0.8.1.0), in that they changed the type from a Maybe to a list in order to support multiple file upload. |
@emhoracek Sorry I missed your comment until just now. Are you saying that the issue is gone and we should close this ticket, or just that digestive-functors worked around it and it's less important? |
@mightybyte I found this issue while debugging a problem with Fn and just wanted to share what I found for any other googlers. If Snap is using the latest digestive functors it should be fixed, but I haven't actually tried it. |
@emhoracek Ok, thanks. It sounds like this might still be considered a bug in |
I just encountered this issue. This is what Firefox sends:
I don't think the difference between |
Should we treat |
...and P.S. I'd prefer this to changing the type, since a correct user program will probably not be broken by that change. |
When you submit a form that contains a file input element, and have not selected a file, you get a PartInfo containing: partFileName = Just "" instead of Nothing.
The text was updated successfully, but these errors were encountered: