* Support Range header for GET
* Adds 'Accept-Ranges: bytes' header to handlers
* proper param name in error
* bump gdrive dependecies
* refactor CloseCheck to avoid panic on nil, remove range/audio/video special handling on get handler
* refactor CloseCheck to avoid panic on nil, handle range with no limit
* refactor CloseCheck to avoid panic on nil, handle range in gdrive storage
* refactor CloseCheck to avoid panic on nil
* handle range with no limit
* lint
* bump deps
* go mod tidy
* gofmt
* cr fixes, replace deprecated ioutil.NopCloser
* linting
* do not write to file by default
* fix storj
---------
Co-authored-by: Vladislav Grubov <vladgrubov@gmail.com>
--total --block-size="K" --dereference were all unrecognized flags for this script. I have updated them to the correct flags to run correctly.
Co-authored-by: Stefan Benten <mail@stefan-benten.de>
* Fixed improper implementation of content type
Add text/plain content type if metadata.ContentType is unable to determine the content type of the file
* Update server/handlers.go
Co-authored-by: Farhan Khursheed <41877347+blind-intruder@users.noreply.github.com>
* Update handlers.go
let's trim space
* Update handlers.go
Co-authored-by: Andrea Spacca <andrea.spacca@gmail.com>
* go.mod,go.sum: Update storj dependencies
* bump go version
* another bump to latest storj release
* set minimum go version in go.mod
Co-authored-by: Andrea Spacca <andrea.spacca@gmail.com>
In order to prevent viewing content, which max-download rate has been reached,
we need to ensure the data is not stored locally in a browser cache.
To achieve this, we set the Cache-Control Setting to "no-store" according to:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Controlfixes#470
* Add X-Url-Delete-* headers to POST handler
* Remove token from header
* Fix writing of headers
* Handle error returned by Write
* Update handlers.go
Co-authored-by: Andrea Spacca <andrea.spacca@gmail.com>
This change propagates the context of the actual user request through.
Additionally it configures the Storj Backend to do in memory buffering instead of relying on temporary files in /tmp/ folders.
Fixes#448
This change moves a couple of defers in order to prevent them from not being executed since we have returned in error cases early.
It also fixes a couple of smaller linting issues, like error messages not starting with a capital letter and variable name collisions with imported packages.
* issue #420 return 400 response when Max-Days is too big
* issue #420 moved the Max-Days check before saving the metadata
* issue #420 added a logging message when Max-Days is invalid
* issue #420 added MaxDate.IsZero() check
Co-authored-by: kugiyasan <kugiyasan@users.noreply.github.com>