diff --git a/proto/caosdb/entity/v1alpha1/main.proto b/proto/caosdb/entity/v1alpha1/main.proto index ee768d055a2ee8211dd02c790653c024f01ac869..c478b50b3fc96d4a33ec8660f0328861486c6984 100644 --- a/proto/caosdb/entity/v1alpha1/main.proto +++ b/proto/caosdb/entity/v1alpha1/main.proto @@ -565,10 +565,8 @@ enum TransmissionStatus { TRANSMISSION_STATUS_GO_ON = 3; } -// Register a file upload indicating the total size if possible. +// Register a file upload. message RegisterFileUploadRequest { - // Estimated total size of the upload. - int64 total_size = 1; } // Response of the file server upon an upload registration request. @@ -577,8 +575,6 @@ message RegisterFileUploadResponse { RegistrationStatus status = 1; // The registration id is used to identify chunks and files which belong to the same upload . string registration_id = 2; - // The server's maximum number of parallel uploads. Requesting more uploads has undefined behavior. - int32 max_parallel_transmissions = 3; // The server's maximum chunk size. Submitting bigger chunks has undefined behavior. int64 max_chunk_size = 4; // The server's maximum file size. Submitting bigger files has undefined behavior. @@ -615,13 +611,16 @@ message FileDownloadHeader { FileIdentifier id = 1; // The file descriptor of the file. FileDescriptor file_descriptor = 2; + // This is the transmission id which can be used to download the actual blob + // in the FileDownloadRequest. + FileTransmissionId file_transmission_id = 3; // Errors for this file (e.g. MESSAGE_CODE_ENTITY_DOES_NOT_EXIST, or // MESSAGE_CODE_FILE_NOT_FOUND). - repeated Message errors = 3; + repeated Message errors = 4; // Warnings for this file. - repeated Message warnings = 4; + repeated Message warnings = 5; // Info messages for this file. - repeated Message infos = 5; + repeated Message infos = 6; } @@ -632,31 +631,18 @@ message RegisterFileDownloadResponse { // The registration id is used to identify chunks and files which belong to // the same upload . string registration_id = 2; - // The server's maximum number of parallel downloads. Starting more parallel - // uploads has undefined behavior. - int32 max_parallel_transmissions = 3; - // The estimated total size of the downloaded files. - int64 total_size = 4; + // Metadata of the files which are to be downloaded. + repeated FileDownloadHeader files = 4; } // Stores a single chunk of a file message FileChunk { - // Chunk metadata. - FileChunkMetadata metadata = 1; - // Chunk id. - FileChunkId id = 2; + // Temporary identifier containing the file and registration_id. + FileTransmissionId file_transmission_id = 1; // Binary data of a chunk. bytes data = 5; } -// Identifies a chunk in a file transmission. -message FileChunkId { - // Temporary identifier containing the file and registration_id. - FileTransmissionId file_transmission_id = 1; - // The number of this chunk. Chunks do not have to be uploaded in the correct - // sequence. This chunk number is used to define the order of the chunks. - int32 chunk_no = 3; -} // Temporary identifier of a single file during a transmission. message FileTransmissionId { @@ -668,11 +654,6 @@ message FileTransmissionId { string file_id = 2; } -// Chunk metadata. -message FileChunkMetadata { - // The size of this chunk - int64 chunk_size = 4; -} // Request for a file upload which has been registered previously. Chunks may be send in any order. message FileUploadRequest { @@ -688,16 +669,8 @@ message FileUploadResponse { // Request for a file download which has been registered previously. message FileDownloadRequest { - // Download a chunk by identifying the chunk explicitely or by letting the - // server decide which chunk is to be send. - oneof request { - // The registration id which has previously been issued by the server. This - // request means: Send any chunk - string registration_id = 1; - // An id of a chunk. The client can guess a chunk id or use one from a - // previous download request's next field. - FileChunkId chunk_id = 2; - } + // Request the next chunk for this file. + FileTransmissionId file_transmission_id = 1; } // Response containing a chunk of a file. @@ -706,8 +679,6 @@ message FileDownloadResponse { TransmissionStatus status = 1; // A single file chunk FileChunk chunk = 2; - // The next chunk (if any) - FileChunkId next = 3; } // File Transaction Service