Have got saving working

This commit is contained in:
Leon Mika 2026-03-28 21:42:35 +11:00
parent f9a65c8ca9
commit c8a276b248
21 changed files with 248 additions and 22 deletions

View file

@ -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)