(cherry picked from commit 37cbed4b48)
Co-authored-by: Selene <selenepinillos@gmail.com>
This commit is contained in:
co-authored by
Selene
parent
10135a4851
commit
c3e46eaa8f
@@ -159,9 +159,13 @@ func (rs *RenderingService) Version() string {
|
||||
|
||||
func (rs *RenderingService) RenderErrorImage(err error) (*RenderResult, error) {
|
||||
imgUrl := "public/img/rendering_error.png"
|
||||
imgPath := filepath.Join(setting.HomePath, imgUrl)
|
||||
if _, err := os.Stat(imgPath); errors.Is(err, os.ErrNotExist) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &RenderResult{
|
||||
FilePath: filepath.Join(setting.HomePath, imgUrl),
|
||||
FilePath: imgPath,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user