fix: uploading a client logo with an URL fails if folder doesn't exist

This commit is contained in:
Elias Schneider
2025-10-04 23:38:26 +02:00
parent f9839a978c
commit ad8a90c839

View File

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