mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-18 17:48:00 +08:00
修复文件上传错误
This commit is contained in:
@@ -13,6 +13,8 @@ import (
|
||||
// 将图片保存到指定的路径
|
||||
func SaveImage(p string, src image.Image) error {
|
||||
|
||||
os.MkdirAll(filepath.Dir(p),0666)
|
||||
|
||||
f, err := os.OpenFile(p, os.O_SYNC|os.O_RDWR|os.O_CREATE, 0666)
|
||||
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user