Fork me on GitHub

Hi, everyone I don't know how I could write a test for the part of out API (that is implemented in pedestal) that accepts a file and uses Ring multi-part interceptor ? (Can I use the pedestal.test/response-for here the same way I used it for body params and such ? How should I construct the request and how should I feed the file to response-for ?) It will be great if anyone could help me Thanks in advance


@UU0F762AU, that’s a great question. Yes you can. I’ve added a sample of how you’d construct the request to the cookbook documentation ( I’ve pasted the relevant bits above.


Hi Thank you for your answer I have another issue about this subject How can we add also a simple key value near my file in the request body? Thank you for your time.


@UBZ3VLMKJ it’s just a matter of adding additional fields wrapped by the boundary. The fields in the above sample do no need to be files


@U0FL657GR Sorry another question, here you have sent a string file. But I want to send xlsx files. Can I use the same method for sending ?


Thanks again