File is opened for editing using rollMyFile.editFile().

rollMyFile.editFile("https://www.example.com/case/123/attachments/overview.docx", {accessToken: "1a2b3c4d5e6f"});

With this call application will open in a separate window with the file loaded into it. User will then be able to save his changes using File->Save or similar function of the application.

🚧

Pop-up Blocker

To prevent pop-up blocker from interfering with application launch this method has to be called from an event handler for click or key press.

More about pop-up blocker from Mozilla developers.

Parameters

ParameterDescription
fileEndpointUrlURL for File Access Endpoint, which is used for downloading file for editing and uploading after it was saved by the user.
options
optional
Access token that is passed back to File Access Endpoint as X-Access-Token header.

This access token can be used for authorizing access to the file, tracking user's activities for the file, etc.
onError
optional
Called when attempt to open a file failed for any reason.
onSuccess
optional
Called after the file was opened successfully.

Supported options are following:

OptionDescription
accessToken
optional
Access token that is passed back to File Access Endpoint as X-Access-Token header.

This access token can be used for authorizing access to the file, tracking user's activities for the file, etc.
fileName
optional
Name of the file to be edited. It is used to determine the application, which will be launched for editing the file. This name will also be used by the application for opening the file.

If fileName is not given, we try to infer it from the fileEndpointUrl.
dirName
optional
Name of the directory, where the file will be available to the application. User will not usually see this, unless the application shows it somewhere in it's UI.

If dirName is not given, domain name from fileEndpointUrl will be used.
app
optional
Id of the app to open the file.