Hello
How to possibly upload files together with other data ?
type Payload struct {
File *os.File `json:"file"`
Field string `json:"field"`
}
file, err := os.Open("somefile.bin")
res, err := pocketbase.Create("files", Payload{
File: file
Field: "blabla"
})
Resty either takes in file as raw bytes or parses them separately https://github.com/go-resty/resty#multipart-files-upload. Sending files a raw bytes doesn't work either.
type Payload struct {
File []byte `json:"file"`
Field string `json:"field"`
}
Hello
How to possibly upload files together with other data ?
Resty either takes in file as raw bytes or parses them separately https://github.com/go-resty/resty#multipart-files-upload. Sending files a raw bytes doesn't work either.