Fork me on GitHub
#pedestal
<
2022-08-25
>
V13:08:43

I am currently trying to create my own version of s3-presigned-url. Where a client can receive and signed-URL and upload their file via the URL and a PUT request. The link generation has gone fine and I can reach my server. I am using pedestal. However it's the file itself I am having a hard time figuring out how to handle. I send the request where the body is the binary file. But what I receive is an org.eclipse.jetty.server.HttpInputOverHTTP object which I have no idea how to handle. I would really like not to switch away from using a PUT request, so is there anybody who can help me on how to handle this, maybe with an interceptor?

V13:08:17

I have seen suggestions of using https://ring-clojure.github.io/ring/ring.middleware.multipart-params.html - But that would require changing from PUT to POST, which i would rather not

V13:08:40

My main problem is that if i receive a file through the endpoint and upload it to aws it will be larger than the one i sent and also corrupt

souenzzo00:08:52

The client is not an Browser/HTML page? Is another JVM?