forked from TrueCloudLab/frostfs-http-gw
Fixes after review
- Maybe it could be rephrased to "attribute name prefixed with X-Attribute-" - Maybe it worth renaming to userAttributeHeaderPrefix - Requirement for having only one file uploaded at a time has to be reflected in documentation. - Maybe this should be reflected in doc - I'm not sure if missing timestamp attribute should be forced on gateway level. Normally it should be set by app and there should be a way not to set it. Signed-off-by: Evgeniy Kulikov <kim@nspcc.ru>
This commit is contained in:
parent
ace31ceefd
commit
3cbd4dbd09
5 changed files with 30 additions and 9 deletions
|
@ -124,8 +124,8 @@ func (a *app) upload(c *fasthttp.RequestCtx) {
|
|||
attributes = append(attributes, filename)
|
||||
}
|
||||
|
||||
// Attribute Timestamp wasn't set from header
|
||||
if _, ok := filtered[object.AttributeTimestamp]; ok {
|
||||
// Attribute Timestamp wasn't set from header and enabled by settings
|
||||
if _, ok := filtered[object.AttributeTimestamp]; ok && a.enableDefaultTimestamp {
|
||||
timestamp := object.NewAttribute()
|
||||
timestamp.SetKey(object.AttributeTimestamp)
|
||||
timestamp.SetValue(strconv.FormatInt(time.Now().Unix(), 10))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue