Skip to content

Commit

Permalink
add folder function
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielW8088 committed Jan 19, 2023
1 parent b835a91 commit de6f616
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions add.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func (s *Shell) AddDir(dir string) (string, error) {
}

// AddDir adds a directory recursively with all of the files under it
func (s *Shell) SwanAddDir(dir string) (*http.Response, error) {
func (s *Shell) SwanAddDir(dir string, wallet string, source string, isFolder string) (*http.Response, error) {
stat, err := os.Lstat(dir)
if err != nil {
return nil, err
Expand All @@ -164,9 +164,7 @@ func (s *Shell) SwanAddDir(dir string) (*http.Response, error) {

resp, err := s.Request("add").
Option("recursive", true).
Body(reader).
Body(reader).Header("wallet", wallet).Header("source", source).Header("is_folder", isFolder).
SwanSend(context.Background())
//fmt.Println(resp.Body)

return resp, nil
}

0 comments on commit de6f616

Please sign in to comment.