Finish the feature of share and bridge.

This commit is contained in:
zicla
2019-04-29 21:14:29 +08:00
parent ca721c78e6
commit d75c4a222e
20 changed files with 605 additions and 330 deletions

View File

@ -797,6 +797,10 @@ func (this *MatterService) AtomicCrawl(url string, filename string, user *User,
panic("资源url必填并且应该以http://或者https://开头")
}
if filename == "" {
panic(result.BadRequest("filename cannot be null."))
}
//从指定的url下载一个文件。参考https://golangcode.com/download-a-file-from-a-url/
resp, err := http.Get(url)
this.PanicError(err)