Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-proto
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-proto
Commits
014805af
Commit
014805af
authored
3 weeks ago
by
Joscha Schmiedt
Browse files
Options
Downloads
Patches
Plain Diff
feat: extend file transmission API to support file upload via TUS
parent
116f3dda
No related branches found
Branches containing commit
No related tags found
1 merge request
!12
Extend Upload API for resumable downloads
Pipeline
#61577
failed
3 weeks ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
proto/caosdb/entity/v2/main.proto
+1
-0
1 addition, 0 deletions
proto/caosdb/entity/v2/main.proto
proto/caosdb/file_transmission/v1/main.proto
+51
-2
51 additions, 2 deletions
proto/caosdb/file_transmission/v1/main.proto
with
52 additions
and
2 deletions
proto/caosdb/entity/v2/main.proto
+
1
−
0
View file @
014805af
...
...
@@ -24,6 +24,7 @@ option java_multiple_files = true;
option
java_package
=
"org.caosdb.api.entity.v2"
;
option
cc_enable_arenas
=
true
;
package
caosdb
.
entity.v2
;
import
"caosdb/file_transmission/v1/main.proto"
;
// for FileTransmissionId
// Data type for references to other entities.
message
ReferenceDataType
{
...
...
This diff is collapsed.
Click to expand it.
proto/caosdb/file_transmission/v1/main.proto
+
51
−
2
View file @
014805af
...
...
@@ -82,8 +82,55 @@ enum TransmissionStatus {
TRANSMISSION_STATUS_GO_ON
=
3
;
}
// Register a file upload.
message
RegisterFileUploadRequest
{}
// TODO: This is very similar to the Hash message in the entity API. We should discuss
// if and how they can be merged.
enum
ChecksumAlgorithm
{
CHECKSUM_ALGORITHM_UNSPECIFIED
=
0
;
CHECKSUM_ALGORITHM_MD5
=
1
;
CHECKSUM_ALGORITHM_SHA1
=
2
;
CHECKSUM_ALGORITHM_SHA256
=
3
;
CHECKSUM_ALGORITHM_SHA512
=
4
;
}
message
Checksum
{
string
checksum
=
1
;
ChecksumAlgorithm
checksum_algorithm
=
2
;
}
// Information about a file which is to be uploaded.
// TODO: This is very similar to the FileDescriptor message in the entity API with the
// difference that it has no relation to an entity and is purely filesystem-oriented.
// Maybe we should re-use FileInformation s part of the entity API?
message
FileInformation
{
// The local filename is the filename, which is used on the client.
string
local_filename
=
1
;
// The target filename is the filename which will be used on the server.
string
target_filename
=
2
;
// Size of the file in bytes.
int
size_bytes
=
3
;
// Checksum of the file according to the checksum algorithm.
Checksum
checksum
=
4
;
}
// Register a file upload for a list of files. The server will respond with a
// registration id and URLs to which the files can be uploaded.
message
RegisterFileUploadRequest
{
repeated
FileInformation
=
1
;
}
// The URL to which a file should be uploaded using the given LinkAhead
// UploadProtocolVersion.
message
UploadLocation
{
string
url
=
1
;
}
// The version of the LinkAhead upload protocol. This is currently identical to
// the TUS protocol version.
message
UploadProtocolVersion
{
int
major
=
1
;
int
minor
=
2
;
int
patch
=
3
;
}
// Response of the file server upon an upload registration request.
message
RegisterFileUploadResponse
{
...
...
@@ -94,6 +141,8 @@ message RegisterFileUploadResponse {
string
registration_id
=
2
;
// The server's transmission settings for the upload.
FileTransmissionSettings
upload_settings
=
4
;
UploadProtocolVersion
version
=
5
;
repeated
UploadLocation
locations
=
6
;
}
// Request for a file upload which has been registered previously. Chunks may be
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment