Have got saving working
This commit is contained in:
parent
f9a65c8ca9
commit
c8a276b248
21 changed files with 248 additions and 22 deletions
|
|
@ -66,6 +66,11 @@ func copyFile(src, dst string) error {
|
|||
return err
|
||||
}
|
||||
|
||||
func (p *Provider) ReplaceFile(site models.Site, up models.Upload, srcPath string) error {
|
||||
fullPath := p.uploadFileName(site, up)
|
||||
return copyFile(srcPath, fullPath)
|
||||
}
|
||||
|
||||
func (p *Provider) OpenUpload(site models.Site, up models.Upload) (io.ReadCloser, error) {
|
||||
fullPath := p.uploadFileName(site, up)
|
||||
return os.Open(fullPath)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue