Skip to content

Commit

Permalink
fix download issue on gofile
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikubill committed Oct 17, 2021
1 parent 0a1d021 commit a61c1fa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
8 changes: 7 additions & 1 deletion apis/public/gofile/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,13 @@ func (b goFile) download(v string, config apis.DownConfig) error {
var sevData folderDetails2
fmt.Printf("fetching ticket..")
end := utils.DotTicker()
body, err := http.Get(fmt.Sprintf("https://api.gofile.io/getFolder?folderId=%s", fileID))

err := b.createUser()
if err != nil {
return err
}

body, err := http.Get(fmt.Sprintf("https://api.gofile.io/getContent?contentId=%s&token=%s", fileID, b.userToken))
if err != nil {
return fmt.Errorf("request %s returns error: %v", getServer, err)
}
Expand Down
12 changes: 6 additions & 6 deletions cmd/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (

//"transfer/apis/public/tmplink"
"transfer/apis/public/transfer"
"transfer/apis/public/vimcn"
// "transfer/apis/public/vimcn"

"transfer/apis/public/notion"
"transfer/apis/public/wenshushu"
"transfer/apis/public/wetransfer"
whc "transfer/apis/public/whitecats"
// whc "transfer/apis/public/whitecats"
)

var (
Expand All @@ -36,7 +36,7 @@ var (
// {"tmp", "tmplink"},
{"cat", "catbox"},
{"lit", "littlebox"},
{"vim", "vimcn"},
// {"vim", "vimcn"},
{"gof", "gofile"},
{"wet", "wetransfer"},
{"arp", "airportal"},
Expand All @@ -46,7 +46,7 @@ var (
{"0x0", "null"},
{"fio", "file.io"},
{"not", "notion", "notion.so"},
{"whc", "whitecat"},
// {"whc", "whitecat"},
{"fic", "1fichier"},
}
baseBackend = []apis.BaseBackend{
Expand All @@ -56,7 +56,7 @@ var (
//tmplink.Backend,
catbox.Backend,
litterbox.Backend,
vimcn.Backend,
// vimcn.Backend,
gofile.Backend,
wetransfer.Backend,
airportal.Backend,
Expand All @@ -66,7 +66,7 @@ var (
null.Backend,
fileio.Backend,
notion.Backend,
whc.Backend,
// whc.Backend,
fichier.Backend,
}
)
Expand Down

0 comments on commit a61c1fa

Please sign in to comment.