Upload file using HTTP post

Skip to first unread message

go je

Apr 21, 2021, 9:25:53 AM4/21/21
to Seaweed File System
Hey guys, I'm new to seaweedfs and I'm stuck to this problem.
I want to HTTP post a file that I retrieve from an HTML form with enctype multipart form data. Upon submitting the form, the response was Error 400 "multipart: NextPart: EOF" .

My seaweedfs master and volume container is just locally hosted.
Using curl just works, retrieving the multipart file from the form value returns a valid image, and the content type is valid as well as its boundary.

I don't know where the error occurred or why but I suspect it is somewhere here:
    resp, err := http.Post(publicAddr, contentType, mf)

Chris Lu

Apr 21, 2021, 2:47:47 PM4/21/21
to Seaweed File System
please create a github issue with reproducible code.

You received this message because you are subscribed to the Google Groups "Seaweed File System" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seaweedfs+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/seaweedfs/6bf3d03e-7521-49fd-9964-e419f84923den%40googlegroups.com.

go je

Apr 22, 2021, 1:31:13 AM4/22/21
to Seaweed File System
I'm not sure what you mean, but I have this test repo with basic setup.
Reply all
Reply to author
0 new messages