saveAndUploadDocuments
suspend fun saveAndUploadDocuments(context: Context, documentsToUpload: List<DocumentToUpload>): List<Triple<Long?, DocumentToUpload, Boolean>>
Content copied to clipboard
Takes in a list of DocumentToUpload, generates entities from them and stores them into the database. Then begins the upload process by calling the DocumentUploadWorker.
Return
List<Triple<LocalId, DocumentToUpload, Boolean>>? List of DocumentToUploads and a boolean flag for each to distinguish which images passed validation and have begun the upload process, and which have not.
Parameters
context
Context that is required for the worker to run against
documentsToUpload
List of DocumentToUpload which are being saved and uploaded