mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 07:07:32 +00:00
fix: add option to disable asset storage (#1878)
* fix: add no storage option * improve error handling
This commit is contained in:
@@ -5,13 +5,9 @@ import (
|
||||
"io"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
caos_errors "github.com/caos/zitadel/internal/errors"
|
||||
)
|
||||
|
||||
func (c *Commands) UploadAsset(ctx context.Context, bucketName, objectName, contentType string, file io.Reader, size int64) (*domain.AssetInfo, error) {
|
||||
if c.static == nil {
|
||||
return nil, caos_errors.ThrowPreconditionFailed(nil, "STATIC-Fm92f", "Errors.Assets.Store.NotConfigured")
|
||||
}
|
||||
return c.static.PutObject(ctx,
|
||||
bucketName,
|
||||
objectName,
|
||||
|
Reference in New Issue
Block a user