I am new to web communication. I use ubuntu and try to learn fastapi. Let's say I post a file using curl. Seems to be common opinion that this is the best way to do it:
curl -F "file=@image1.jpg" http://127.0.0.1:8000/image -v
Now, on the server side I want to retrieve the image and add 1 to every pixel-value and then return it. But I have now idea how I "catch" the image from curl, how do I do that? Right now, I only have the the dummy function below which does not do anything intelligent:
@app.post("/image")
async def post_test():
print("I don't know how to catch the image :( ")
return {"You sent an image..."}
Please help with how I should write the post_test function! (Flask would work as well.)