Trinoor Dev Docs

Search

Search IconIcon to open search

Opportunistic Upload

Last updated Oct 12, 2022

# Opportunistic Upload

# What is it?

Opportunistic upload allows your documents to be automatically synced with DocAPI while online and while you work on your documents. This is useful as it can also prevent data-loss by continuously keeping your local changes synchronized with DocAPI.

# Terminology

# How do I enable it?

There are quite a few criteria that must be met before opportunistic uploads will occur. Firstly, auto-uploads must be enabled in the class settings within the designer. Secondly, opportunistic uploads will not enable if Check In/Out is set to No as this means that users will only be able to download an immutable cache of the remote documents. Opportunistic uploads will also not execute if New Name is set to Force, as this means that a new document would be created each time any individual markup is made.

By extension, it will also only run if either security_replace is set to Y and rename_markup is N, or for a document, if security_create is Y and rename_markup is Y or O.

# When does it execute?

Auto-saves occur one second after the last modification made to a document if it has been checked out, while opportunistic uploads will attempt to auto-sync your documents 10 seconds after the last modification. If another edit is made during this 10-second wait, the timer will reset back to 10 seconds. This is done to prevent constant re-uploads of documents while they are being worked on which would be a heavy load on the server.

When you login or re-gain a connection to the server, the client will also scan through all checked out documents and see if any are marked as dirty, upon finding any of these it will make sure to upload them immediately.

# Overrides

An override button should generally only be accessible by administrators, as this button will remove any check-out locks that a user may have, and will send a notification to that user’s device which will wipe and delete their lock - and all documents - for that specific class folder off of their device.