Exemple #1
0
        private void UploadChunks(AllocateResult chunk)
        {
            // Query for chunks
            var chunks = this.ConduitClient.CallMethod(
                "file.querychunks",
                new Dictionary <string, dynamic> {
                { "filePHID", chunk.PHID }
            });

            Debugger.Break();
        }
Exemple #2
0
        private string UploadData(AllocateResult file)
        {
            var parameters = new Dictionary <string, dynamic> {
                { "name", file.Uploadable.Name },
            };

            if (file.Uploadable.ViewPolicy != null)
            {
                parameters.Add("viewPolicy", file.Uploadable.ViewPolicy);
            }

            parameters.Add("data_base64", file.Uploadable.GetData());

            dynamic result = this.ConduitClient.CallMethod("file.upload", parameters);

            if (result.error_info != null)
            {
                throw new ConduitException(result.error_code, result.error_info);
            }

            return((string)result.result);
        }