-
Notifications
You must be signed in to change notification settings - Fork 0
File System source
The most simple way of uploading documents to Microsoft SharePoint is to configure one or more source folders from which the containing documents are uploaded to Microsoft SharePoint.
During the time the source is active, it scans for new documents in the indicated folders and uploads them to the configured Microsoft SharePoint libraries/lists. Uploaded files are moved to .archive
, a child folder of the scanned folder. Documents which failed to upload are moved to .failed
folder, which is also a child folder of the scanned folder.
Uploaded files receive a unique ID added between the file name and file extension prior to uploading. This is by design, as uploading files with the same name should not overwrite/add a new version to the same file. If, however, this behavior is not desired, you can disable it by setting "preserveOriginalName": true
.
Contains the source added fields and the folder list configuration.
-
fields
: A list of fields to be applied to all uploaded documents in the configured folders. -
syncFolders
: An array of folder configurations. For each folder, the following options are available:-
path
: Required. The path to the folder. -
library
: The library where the documents retrieved from this folder should be uploaded. If not provided, the library indicated in the global settings file is used. -
filePattern
: Filter to upload only certain files. If not provided, all files are considered. The pattern is the typical operating system pattern. Example:"filePattern": "*.pdf"
will include only PDF files. -
recursive
: Indicates whether the documents folder should include all sub folders at any level. Default value:false
.- Note
.archive
and.failed
sub folders are ignored.
- Note
-
preserveOriginalName
: Flag used to control the name of the uploaded file. Iffalse
, the file name receives an ID added between the file name and file extension prior to uploading, so that file names are unique in SharePoint. Default value:false
. -
preserveFolderStructure
: Flag used to control the relative path of the uploaded file. Iffalse
, the file is uploaded in the list's root folder, otherwise a folder structure mirroring the source structure is created. Default value:false
. -
fields
: A list of fields to be applied to all uploaded documents in this folder.
-
{
"fields": {
"Source": "Scan",
"RequireOCR": false
},
"syncFolders": [
{
"path": "D:\\Temp\\ToSyncScan",
"preserveFolderStructure": true
},
{
"path": "D:\\Temp\\ToSyncUnknown",
"recursive": true,
"library": "Unsorted",
"fields": {
"Source": "Unknown",
"RequireOCR": true
}
}
]
}
Make sure that the user starting the application has read-write permissions for the configured folders, otherwise the application will not be able to work properly.
Please provide rooted directory names, as relative specified directories may lead to unpredictable results, depending from which current directory the application is started.