Skip to end of banner
Go to start of banner

attachFile

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Description

Adds an attachment to a selected page.

Parameters

Return Type

Boolean (true/false)

The return value represents the success of adding the attachment. If the routine returns true the attachment was successfully added.

Example

string path_to_file;
number page;
path_to_file = "C:/confluence/home/attachment/file_to_attach_1.jpg";
page = 11801;
attachFile(path_to_file, page);

Result: Returns true if the file is at the selected location and the issue exists. It means the file was attached. Returns false if any of the conditions stated before are not met.


Use forward slashes ("/") for the path. The path to the attachment must be absolute and point to a location on the server. If an error occurs, the routine will return false and the error message will be visible in the log.


See also

  • No labels