Open ploiu opened 1 year ago
Attributes will be done for next release
use Metadata to get file size and date created. Best to use MB/KB/GB/etc instead of MiB/KiB/GiB/etc since they're more predictable(?)
the mime_guess crate can guess some mime types but it is far from being complete. Best thing to do is to look at the file extension and have a static mapping from file extension => searchable file type.
Current file types in file server
common extensions based on mime types and what I have on my file server
Searchable "tags" and "attributes" for files and folders.
Additions
Tags
FileResponse
andFolderResponse
models astags
Attributes
Searching
use
@
for searching attributes from the ui use+
for searching tags from the ui e.g.?search=test&attributes.size=>5KB&attributes.type=image&tags=tag1&tags=tag2&tags=tag3
query
is missing, as long asattributes
is presentsize
anddate_created
size
will be treated as a raw numeric value, but will allow shorthands such as KB, KiB, MB, MiB, GB, GiB, TB, TiBsize
will allow for comparison operators such as>
,>=
,<
,<=
, and=
(inferred if none specified)@size:>1MB
will pull files greater than 1 Megabyte, while@size:1MB
will pull files equal to 1MB