In the Documents Setup, a new Default Storage Provider is available - SharePoint.
To use it - the user must specify all needed data in the SharePoint tab.
The app must be registered on the Azure Portal and all data must be taken from there.
In Subfolders the user can specify where the file will be uploaded when it is added to the specific document.
If Path is empty - the file is added to the base folder.
If the folder is chosen but does not exist anymore (for example was deleted) - the user will see an error when he tries to upload the file to the document.
If the folder contains already the same file that is being uploaded - the user will see an error because the file cannot be applied twice.
If files are taken from the previous document (for example when Work Order with documents is being closed - the documents are added automatically to the Posted Work Order) - these files are not changing their place on SharePoint, they are also not duplicated, they are still in the folder where they were placed for the first time.