Hi,
I’m using Akka 2.6.4 with scala 2.13 in Java 11.
I’m working to build a Rest Server with Akka-http and for now it’s works very fine.
I having some trouble to implement Multipart, because my Thermal Camera send POST in multipart to my Rest Server but I receive always this error “multipart/form-data part must contain Content-Disposition
header with name
parameter”.
But only with my “Thermal Camera”, other test for example via curl works fine.
-F "userid=1" -F "filecomment=This is an image file" -F "imagage2=@/Users/devisbalsemin/Downloads/heat.jpg;" localhost:8183/release/test
I’have noted that my camera send filename with ;(semicolon).
> Content-Disposition: form-data; name="TMPA"; filename="TMPA.jpg";
In Scala I’m new, but I don’t saw [https://github.com/akka/akka-http/blob/master/akka-http-tests/src/test/scala/akka/http/scaladsl/unmarshalling/MultipartUnmarshallersSpec.scala](http://Akka-http Test)
that the test condition with semicolon …
Can you help me? Have you workaround please?
this my code
post(RouteUtils.prefixSlash(HIK, extractRequestContext(ctx -> toStrictEntity(timeout, () -> extractRequest(req -> {
if (req.entity() instanceof HttpEntity.Strict) {
final HttpEntity.Strict strict = (HttpEntity.Strict) req.entity();
CompletionStage<Multipart.FormData> formData = Unmarshaller.entityToMultipartFormData().unmarshal(req.entity(), ctx.getMaterializer()).handle((e, t) -> {
if (t != null)
t.printStackTrace();
return e;
});