Skip to content

Commit

Permalink
Bump version, release notes, docs
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCreosote committed Nov 11, 2020
1 parent b51e62c commit c40597e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,21 @@ RETURNS: an ACL.
## Download a file from a node
```
AUTHORIZATION OPTIONAL
GET /node/<id>?download[_raw]
GET /node/<id>?download[_raw][&seek=#][&length=#]
RETURNS: the file content.
```

`?download_raw`, as opposed to `?download`, causes the `Content-Disposition` header to be
omitted.

`seek` causes the first `#` bytes of the file to be skipped. A `seek` value greater than or equal
to the file size is an error. Defaults to 0.

`length` determines the number of bytes of the file to return after skipping `seek` bytes.
`length` may be greater than the remaining file length. Defaults to 0, which indicates that the
remainder of the file should be returned.

## Set a node to be publicly readable
```
AUTHORIZATION REQUIRED
Expand Down
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.1.1

- Added seek & length parameters to file download requests

# 0.1.0

- Initial release
2 changes: 1 addition & 1 deletion app/blobstore.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

const (
name = "blobstore"
version = "0.1.0"
version = "0.1.1"
shockname = "Shock"
shockver = "0.9.6" // do not increment
deprecation = "The id and version fields are deprecated."
Expand Down
2 changes: 1 addition & 1 deletion service/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ func (t *TestSuite) TestStoreAndGetWithFilename() {
t.checkFile(t.url+path2+"?download_raw", path2, &t.noRole, 9, "", []byte("foobarbaz"))
}

func (t *TestSuite) TestStoreAndGetNodeAsAdminWithFormatAndTrailingSlashAndSeekAndGet() {
func (t *TestSuite) TestStoreAndGetNodeAsAdminWithFormatAndTrailingSlashAndSeekAndLength() {
body := t.req("POST", t.url+"/node/?format=JSON", strings.NewReader("foobarbaz"),
"oauth "+t.noRole.token, 378, 200)
t.checkLogs(logEvent{logrus.InfoLevel, "POST", "/node/", 200, ptr("noroles"),
Expand Down

0 comments on commit c40597e

Please sign in to comment.