copyFile(originURL, destinationURL, doAutoAuth = true)

The pods:copyFile() action copies the file in the connected storage specified by the URL, originURL, to the target URL, destinationURL. This does not modify the file inside the connected pod. This action is significantly cheaper to use than retrieving the file from the storage and manually copying it.

The pods:copyFile() action has the following parameters:

  • originURL — A required string parameter that provides the source of the file to the library, allowing it to fetch the file. The library is expecting an absolute URL using the http URI scheme (e.g.

  • destinationURL — A required string parameter that provides the final location for the file to be housed at which can be outside or inside the pod. The library is expecting an URL using the http or file URI scheme. This URL should include the file name at the end (e.g.

  • doAutoAuth — An optional boolean parameter that controls automatic authentication attempts. It defaults to true if nothing is passed in for it. When true, the library will check that the stored authentication token is valid if it exists, and if the token is not valid or the token does not exist, the library will attempt to automatically authenticate once.

Copyright Picolabs | Licensed under Creative Commons.