mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 13:22:57 +03:00
fix: uploading a client logo with an URL fails if folder doesn't exist
This commit is contained in:
@@ -1938,6 +1938,11 @@ func (s *OidcService) downloadAndSaveLogoFromURL(parentCtx context.Context, tx *
|
||||
}
|
||||
|
||||
imagePath := common.EnvConfig.UploadPath + "/oidc-client-images/" + clientID + "." + ext
|
||||
err = os.MkdirAll(imagePath, os.ModePerm)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
err = utils.SaveFileStream(io.LimitReader(resp.Body, maxLogoSize+1), imagePath)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user