Files
This package provides a clean way of working with files.
To work with files first call ->files() followed by a method.
Get file
Accepts a file id, returns an array.
Box::files()->file($id);
Download file
Accepts a file id Optionally a path can be used when $storeDownload is set to true. To download the file only an id is required.
Box::files()->download($id, $path = '', $storeDownload = false);
Upload file
Accepts a file path and filename. Optionally specify the parent, defaults to 0 when omitted.
Box::files()->upload($path, $name, $parent = 0);
Upload revision
Accepts the file id, file path and filename. Optionally specify a new name.
Box::files()->uploadRevision($file_id, $filepath, $name, $newname = null);
Delete file
Accepts a file id, returns no output.
Box::files()->destroy($id);