removeFileShare(file, user) Last updated: 17. Oct 2026
API only function
Removes / terminates a user's access to a specific file.
Parameters
| Name | Type | Description |
|---|---|---|
| file | string | Absolute path to file to remove a user from. |
| user | string (email) | Email to user to remove access. |
Returns
true when the share is removed. Throws "No such share!" (error 2) if the user has no share there, and error 101 for an invalid email. Returns null if the file is not found. The call runs as the site's publisher.
Example
Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.docly.removeFileShare("test file", "test@docly.net");