Closed
Description
Is your feature request related to a problem? Please describe.
I'm always frustrated when frontend returns obscure errors for simple requests. Uploading a binary file can result in
"writer close: status: code = 2048 message = access to object operation denied"
in cases where we know the request will fail in advance. One of such cases is missing/wrong Content-Type.
Describe the solution you'd like
Check Content-Type prior to upload:
- do not allow to upload objects with Content-Type from this list: https://github.com/nspcc-dev/neofs-oauthz/blob/678efff06128fa585e3ac2aa271e1b448023d090/bearer/bearer.go#L56
- in case it's missing add
application/octet-stream
type which works fine for most purposes
Describe alternatives you've considered
No alternatives.