Download a File

Download a File to a temporary file or a given directory or file.


Permissions Required

You must have permissions to read the field that the file was uploaded to for this request to succeed.

Method Signature Download(String id); Download(String id, String directory);


idStringThe id of the File to download
directoryStringThe directory to save the download to. The file's
original name will be preserved. Defaults to a local temporary directory. downloaded File


 * This example demonstrates downloading a File
import org.catalytic.sdk.CatalyticClient;

public class Program {
    public static void main(String[] args) throws Exception {
      	// Create and initialize Catalytic SDK Client
        CatalyticClient catalytic = new CatalyticClient();
      	// Download a specific File by id file = catalytic.files().download("e6df431b-1041-4326-89e5-1e14caa6a08f");
      	System.out.println("File downloaded to " + file.getAbsolutePath());