score:0

Accepted answer

have you considered doing a "map" instead of a match?

fileparams.get("profilepic").map(file => (file.get(), file.contenttype.getorelse("application/octet-stream"), file.name))

this will work in the cases when you do have a file uploaded, and will return none in the cases where nothing is present


Related Query

More Query from same tag