add file type filter chip (#7602)

* add file type filter chip

* changed the keyword

* use reva issue-7432-replace

* changed the filter name. fix types

* rework mapBinary

---------

Co-authored-by: Roman Perekhod <rperekhod@owncloud.com>
This commit is contained in:
Roman Perekhod
2023-11-13 18:04:17 +01:00
committed by GitHub
co-authored by Roman Perekhod
parent 3653df5f96
commit 7ab553e23b
9 changed files with 399 additions and 60 deletions
@@ -69,26 +69,26 @@ type CapabilitiesSearch struct {
// CapabilitiesSearchProperties holds the search property capabilities
type CapabilitiesSearchProperties struct {
Name *CapabilitiesSearchProperty `json:"name" xml:"name" mapstructure:"name"`
Mtime *CapabilitiesSearchPropertyMtime `json:"mtime" xml:"mtime" mapstructure:"mtime"`
Size *CapabilitiesSearchProperty `json:"size" xml:"size" mapstructure:"size"`
Mimetype *CapabilitiesSearchProperty `json:"mimetype" xml:"mimetype" mapstructure:"mimetype"`
Type *CapabilitiesSearchProperty `json:"type" xml:"type" mapstructure:"type"`
Tag *CapabilitiesSearchProperty `json:"tag" xml:"tag" mapstructure:"tag"`
Tags *CapabilitiesSearchProperty `json:"tags" xml:"tags" mapstructure:"tags"`
Content *CapabilitiesSearchProperty `json:"content" xml:"content" mapstructure:"content"`
Scope *CapabilitiesSearchProperty `json:"scope" xml:"scope" mapstructure:"scope"`
Name *CapabilitiesSearchProperty `json:"name" xml:"name" mapstructure:"name"`
Mtime *CapabilitiesSearchPropertyExtended `json:"mtime" xml:"mtime" mapstructure:"mtime"`
Size *CapabilitiesSearchProperty `json:"size" xml:"size" mapstructure:"size"`
MediaType *CapabilitiesSearchPropertyExtended `json:"mediatype" xml:"mediatype" mapstructure:"mediatype"`
Type *CapabilitiesSearchProperty `json:"type" xml:"type" mapstructure:"type"`
Tag *CapabilitiesSearchProperty `json:"tag" xml:"tag" mapstructure:"tag"`
Tags *CapabilitiesSearchProperty `json:"tags" xml:"tags" mapstructure:"tags"`
Content *CapabilitiesSearchProperty `json:"content" xml:"content" mapstructure:"content"`
Scope *CapabilitiesSearchProperty `json:"scope" xml:"scope" mapstructure:"scope"`
}
// CapabilitiesSearchProperty represents the default search property
type CapabilitiesSearchProperty struct {
Enabled bool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
Enabled ocsBool `json:"enabled" xml:"enabled" mapstructure:"enabled"`
}
// CapabilitiesSearchPropertyMtime represents the mtime search property
type CapabilitiesSearchPropertyMtime struct {
CapabilitiesSearchProperty
Keywords []string `json:"keywords" xml:"keywords" mapstructure:"keywords"`
// CapabilitiesSearchPropertyExtended represents the extended search property
type CapabilitiesSearchPropertyExtended struct {
CapabilitiesSearchProperty `mapstructure:",squash"`
Keywords []string `json:"keywords,omitempty" xml:"keywords,omitempty" mapstructure:"keywords"`
}
// Spaces lets a service configure its advertised options related to Storage Spaces.
@@ -368,7 +368,7 @@ func (upload *Upload) Finalize() (err error) {
err = upload.tp.WriteBlob(n, upload.binPath)
subspan.End()
if err != nil {
return errors.Wrap(err, "failed to upload file to blostore")
return errors.Wrap(err, "failed to upload file to blobstore")
}
return nil