Message Boards Message Boards

Create an API that copies a file from localhost to cloud?

Posted 8 years ago

Running in a notebook on the desktop

CopyFile[localpath, CloudObject[cloudname]]

will copy the local file to the cloud.

Is it possible to deploy a cloud API that accepts a URL for the local file and performs the copy?

Something like:

CloudDeploy[APIFunction[{"localpath" -> "String"}, CopyFile[#localpath, CloudObject[cloudname]] &],  CloudObject["GetLocalFile"]]

I want to avoid using the "UploadedFile" interpreter type in a form page.

POSTED BY: John McGee
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract