The multipart request needs to be constructed like explained here: HTTP API | IPFS Docs
Your curl attempt does not do that. It is difficult or at least not trivial to use curl to upload a folder. For a start, you have to replicate the folder-tree layout as parts in the multipart request. You are just sending a single part declared as “directory” and passing a folder as File to curl, which probably does not know what to do with it. I am not sure how to make a multipart request with curl, with several parts, each with custom headers, although it’s probably not impossible.