Import a file in CLOUDFLOW
With this API call you can import a file in CLOUDFLOW.
api.file.copy_file(source_path, destination_path)
Both parameters use the URL schema. As the imported file will be located outside CLOUDFLOW, a
file://
schema will be used. The destination path will be a CLOUDFLOW URL.
Example
In Windows, you can import c:\Files to import\document.pdf in CLOUDFLOW with this API call:
api.file.copy_file("file:///c:/Files%20to%20import/document.pdf",
"cloudflow://PP_FILE_STORE/Demo%20Files")
.
You can access document.pdf in CLOUDFLOW with this URL: cloudflow://PP_FILE_STORE/Demo%20Files/document.pdf.
On , you
can import /Users/joe/Files to import/document.pdf (located
on the Macintosh HD drive) with this API call:
api.file.copy_file("file:///Macintosh%20HD/Users/joe/Files%20to%20import/document.pdf"
"cloudflow://PP_FILE_STORE/Demo%20Files")
.
{
copied_file: "cloudflow://PP_FILE_STORE/Demo%20Files/document.pdf"
}