Closed marirs closed 2 years ago
A type that is used in the data part of #[post("/static", data = "<file>")]
need to implement FromData
This is done here:
https://github.com/GREsau/okapi/blob/5cb59b3fddcf24294b4c6110882d89a68eaf01c1/rocket-okapi/src/request/from_data_impls.rs#L62-L67
But as you can see it is currently waiting on https://github.com/GREsau/schemars/issues/103
Maybe you can solve it with the comment GREsau left here: https://github.com/GREsau/schemars/issues/103#issuecomment-917700888
If that does not solve it for you. There needs to be an implementation of JsonSchema
added for TempFile
inside schemars
or rocket
.
Because of trait impl limitations I can not resolve it in okapi
.
I'll close the issue here because but feel free to reply and/or comment here or in the linked issue.
Thanks so much.
Is it still an issue ? @ralpha @marirs thx
@jfroffice yes, follow the issue by looking at https://github.com/GREsau/schemars/issues/103
Pardon me if this is a redundant question, I searched the issues, did not find anything in here.
I'm using this:
I get this error:
However if I use just
file: TempFile<
_>` it works well.How to solve this?
Thanks in advance