Open
Description
Bug report
Describe the bug
Got error "body must be object" when delete file
To Reproduce
Got error when remove file, the error is "body must be object", after i debug when call api to remove object got this response,
{"statusCode":"400","error":"Error","message":"body must be object"}
This is my code
type SupabaseStorage struct {
client *storage_go.Client
bucketName string
}
func NewStorage(conf *config.Config) storage.Storage {
storageUrl := fmt.Sprintf("%s/storage/v1", conf.Supabase.Url)
client := storage_go.NewClient(storageUrl, conf.Supabase.Key, nil)
return &SupabaseStorage{
client: client,
bucketName: conf.Supabase.Bucket,
}
}
func (s *SupabaseStorage) Delete(filename string) error {
_, err := s.client.RemoveFile(s.bucketName, []string{filename})
if err != nil {
return err
}
return nil
}
Expected behavior
Successfully delete file
System information
- Version of supabase-go: v0.7.0
- Version of Golang: 1.22