Upload a File

Upload a one or more new Files to Catalytic.


Consider using CompleteStepRequest Instead

If you are uploading files as part of completing a task, consider passing a FileInfo reference to CompleteStepRequset.SetInput instead. See Complete an Instance Step for an example.

Method Signature

File Upload(FileInfo file);
async Task<File> UploadAsync(FileInfo file);


fileFileInfoThe File to upload
returnsFileThe metadata for the uploaded file
List<File> UploadFiles(IEnumerable<FileInfo> files);
Task<List<File> UploadFilesAsync(IEnumerable<FileInfo> files);
filesIEnumerable<FileInfo> The Files to upload
returnsFileThe metadata for the uploaded file


 * This example demonstrates uploading a File to Cataltyic
using System.IO;

namespace Catalytic.Sdk.Examples
    class Program
        static void Main(string[] args)
            var catalytic = new Catalytic.Sdk.CatalyticClient(Credentials.Default);
            // create a file to upload
            var file = new FileInfo(Path.GetTempFileName());
            File.WriteAllText(file.FullName, "SDK Example");
            // upload the file
            var result = catalytic.Files.Upload(file);
            Console.WriteLine($"Uploaded file has ID {result.Id}");