GO: How to get direct download link?
mizzunet opened this issue · comments
func uploadFile(f string) string {
client := plik.NewClient("https://plik.root.gg")
upload := client.NewUpload()
file, err := upload.AddFileFromPath(f)
err = file.Upload()
if err != nil {
log.Println("some erre", err)
}
uploadURL, err := upload.GetURL()
return uploadURL.String()
}
Here, uploadURL
is just an URL to open the download page. How do I get this file's direct downoad link?
Hi @mizzunet
// Each file has it's own direct download URL
fileURL, err := file.GetURL()
Thanks (: