* Return chunk even if range is greater than filesize
* Allow range.start or range.end to not be defined
Examples:
bytes=-300
bytes=300-
bytes=-300- (negative start)
* Make expression lazy instead of greedy
Fix CodeQL "Polynomial regular expression used on uncontrolled data"
* Improve checks readability
* Show proper range in case of failure
* Fix compare falsy values vs zero values
* replace regex
* Handle range validation in a single place
* Clean validation
* Use range object for exception
* Resolve range undefined check
* Prefer strict equality checks
* Cleanup
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* GraphQL count aggregation for all fields
Fixes#11792
* Rename countRows to countAll
* moved function to new apply-query folder
Co-authored-by: jaycammarano <jay.cammarano@gmail.com>
* Sort keys to ensure order
* Set query limit as the number of keys
* Add query limit only when reading by keys
* Update test
* Check if keys is of array type
* Update knex to version 2.0.0
Fixes#10842
* Remove unused optional dependencies
* Update sqlite3 to version 5.0.6
* Fix returning primary key when inserting items into database
* first attempt at nested sorting
* pull out addJoin so it can be reused
* Move get-relation-info to file, add tests
* Extract get-column-path, add tests
* Little cleanup
* Prevent the regex from blowing up with malicious input
* Allow sorting on m2o fields in the tabular layout
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* add basic util function for later use
* sketch up useRelationMultiple implementation
* update relation util and start reworking relational interfaces
* support filter in m2o
* start working on useRelationMultiple
* continue working on relational foundation
* finish basic use-relation-multiple composable
* get o2m pretty close to being finished
* finish up list-o2m
* replace old interfaces
* copy existing interface
* rewrite vue file
* highlight deleted items
* use Search instead of Get
* support selection on m2m
* finish up m2m
* replace old files
* update files interface
* fix permission checks
* fix styling
* add sketches to explain relations
* rewrite m2a interface
* add usage hint to use-relation-multiple
* update file interface to use new composable
* update file-image interface
* fix image not being shown
* revert names
* fix selection of existing items
* fix loading selected items
* in between commit
* update translations interface
* try using composable recursive
* try linear approach on value modeling
* finish rewriting list-o2m-tree-view interface
* revert api changes
* fix sorting for list-o2m-tree-view
* fix selected items in created array
* Add direct download option to files interface
* Fix linter warnings
* Weird that it's being difficult, but ok
* Cast existingItemCount to number at all times
* fix page gets set below 1
* align pagination to the right
* highlight deselecting row
* show min 1 skeleton loader
* only filter selected when item exists
* fix working on new items
* Fix linter warning
* fix deselecting selected items
* show different icon depending if icon is local
* add changes from #12611
* Add _some vs _none support to o2m
* finish filtering out selected items
* Use get instead of search request
* fix save and stay
Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
* fix adding items to m2o
* Fix linter warning
* Handle no-type better
* Clean up axios usage
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
Co-authored-by: Azri Kahar <42867097+azrikahar@users.noreply.github.com>
* Adds x-directus-cache response header with HIT value
* Added ENV var for cache header and MISS, UNCACHEABLE
* Rename CACHE_HEADER_KEY -> CACHE_STATUS_HEADER
Tad opinionated, but I feel like it describes the functionality slightly better
* Return miss consistently
Uncacheable doesn't quite describe what's happening. The user actively requests the cache to be skipped, which should result in an expected miss. The value isn't un-cacheable, the cache is skipped on purpose
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
* add `Last-Modified` header to `/assets/*` responses
only affects assets with a valid `modified_on` DB field
* update docs about `Last-Modified`
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>