sync: resizePicture uses image from importer instead of local file
This commit is contained in:
parent
c7d1d7ce4c
commit
b55151623c
2 changed files with 13 additions and 8 deletions
|
|
@ -398,7 +398,7 @@ func SyncExercice(i Importer, theme *fic.Theme, epath string, dmap *map[int64]*f
|
|||
if len(e.Image) > 0 {
|
||||
if _, err := i.importFile(e.Image,
|
||||
func(filePath string, origin string) (interface{}, error) {
|
||||
if err := resizePicture(filePath, image.Rect(0, 0, 500, 300)); err != nil {
|
||||
if err := resizePicture(i, origin, filePath, image.Rect(0, 0, 500, 300)); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue