forked from cs3org/reva
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jörn Friedrich Dreyer <[email protected]> filter metadata Signed-off-by: Jörn Friedrich Dreyer <[email protected]> calculate sizediff on demand Signed-off-by: Jörn Friedrich Dreyer <[email protected]> fix empty bucketid Signed-off-by: Jörn Friedrich Dreyer <[email protected]> add changelog Signed-off-by: Jörn Friedrich Dreyer <[email protected]> drop unnecessary flag from cleanup Signed-off-by: Jörn Friedrich Dreyer <[email protected]> fix tests Signed-off-by: Jörn Friedrich Dreyer <[email protected]> drop unused variable Signed-off-by: Jörn Friedrich Dreyer <[email protected]> fix unit tests Signed-off-by: Jörn Friedrich Dreyer <[email protected]> move Finalize to upload package Signed-off-by: Jörn Friedrich Dreyer <[email protected]> move more functions to upload package Signed-off-by: Jörn Friedrich Dreyer <[email protected]> propagate sizediff on BytesReady and Revert on failure Signed-off-by: Jörn Friedrich Dreyer <[email protected]> reuse tus datastore from fs Signed-off-by: Jörn Friedrich Dreyer <[email protected]> always set file length when initiating uploads Signed-off-by: Jörn Friedrich Dreyer <[email protected]> log error if we cannot terminate upload Signed-off-by: Jörn Friedrich Dreyer <[email protected]> make linter happy Signed-off-by: Jörn Friedrich Dreyer <[email protected]> always send upload length Signed-off-by: Jörn Friedrich Dreyer <[email protected]> use s3ng config for datastore as well Signed-off-by: Jörn Friedrich Dreyer <[email protected]> allow configuring upload object prefixes and temp dir Signed-off-by: Jörn Friedrich Dreyer <[email protected]> fix s3ng test config Signed-off-by: Jörn Friedrich Dreyer <[email protected]> fix chunking v1 Signed-off-by: Jörn Friedrich Dreyer <[email protected]> fix chunking v1 --sign open existing file Signed-off-by: Jörn Friedrich Dreyer <[email protected]> restore size diff calculation Signed-off-by: Jörn Friedrich Dreyer <[email protected]> treat 0 byte uploads as size deferred Signed-off-by: Jörn Friedrich Dreyer <[email protected]> return empty reader for 0 byte files Signed-off-by: Jörn Friedrich Dreyer <[email protected]> comment change that always sends filesize in upload opaque Signed-off-by: Jörn Friedrich Dreyer <[email protected]> remove commented code Signed-off-by: Jörn Friedrich Dreyer <[email protected]> fix legacy chunking on s3 Signed-off-by: Jörn Friedrich Dreyer <[email protected]> comment size to check if that causes nc tests te fail Signed-off-by: Jörn Friedrich Dreyer <[email protected]> run single failing test Signed-off-by: Jörn Friedrich Dreyer <[email protected]> drop unused option Signed-off-by: Jörn Friedrich Dreyer <[email protected]> ignore mlock files when iterating revisions Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
- Loading branch information
Showing
28 changed files
with
1,522 additions
and
1,324 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Enhancement: Use Tusd data storage implementations | ||
|
||
Decomposedfs now uses the data store implementation for uploads that comes with tusd instead of implementing the interface itself. This allows storing uploads directly in s3. When all bytes are transferred tusd will call `PreFinishResponseCallback` if the storage driver implements it. | ||
|
||
https://github.com/cs3org/reva/pull/4148 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package tus | ||
|
||
import ( | ||
"net/http" | ||
"strings" | ||
|
||
tusd "github.com/tus/tusd/pkg/handler" | ||
) | ||
|
||
type FilterResponseWriter struct { | ||
w http.ResponseWriter | ||
header http.Header | ||
} | ||
|
||
const TusPrefix = "tus." | ||
const CS3Prefix = "cs3." | ||
|
||
func NewFilterResponseWriter(w http.ResponseWriter) *FilterResponseWriter { | ||
return &FilterResponseWriter{ | ||
w: w, | ||
header: http.Header{}, | ||
} | ||
} | ||
|
||
func (fw *FilterResponseWriter) Header() http.Header { | ||
return fw.w.Header() | ||
} | ||
|
||
func (fw *FilterResponseWriter) Write(b []byte) (int, error) { | ||
return fw.w.Write(b) | ||
} | ||
|
||
func (fw *FilterResponseWriter) WriteHeader(statusCode int) { | ||
metadata := tusd.ParseMetadataHeader(fw.w.Header().Get("Upload-Metadata")) | ||
tusMetadata := map[string]string{} | ||
for k, v := range metadata { | ||
if strings.HasPrefix(k, TusPrefix) { | ||
tusMetadata[strings.TrimPrefix(k, TusPrefix)] = v | ||
} | ||
} | ||
|
||
fw.w.Header().Set("Upload-Metadata", tusd.SerializeMetadataHeader(tusMetadata)) | ||
fw.w.WriteHeader(statusCode) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.