Skip to content

Commit 5757d7c

Browse files
committed
Adjust file upload to conform to DirectAdmin's API path changes
1 parent baef83f commit 5757d7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (c *UserContext) UploadFile(uploadToPath string, fileData []byte) error {
134134
}
135135

136136
// Now use this content type which includes the boundary.
137-
if _, err = c.uploadFile(http.MethodPost, "/api/filemanager/upload?dir="+filepath.Dir(uploadToPath)+"&name="+filepath.Base(uploadToPath), body.Bytes(), nil, writer.FormDataContentType()); err != nil {
137+
if _, err = c.uploadFile(http.MethodPost, "/api/filemanager-actions/upload?dir="+filepath.Dir(uploadToPath)+"&name="+filepath.Base(uploadToPath), body.Bytes(), nil, writer.FormDataContentType()); err != nil {
138138
return err
139139
}
140140

0 commit comments

Comments
 (0)