I create and send an authorization code to a user, which accesss fileSendr with Anonymous access.
When he tries to upload the files this error is thrown:
Exception occurred calling method NotesDocument.save(boolean) null
Solution (FIX):
1) Custom control: cc_fileUploader
a) Computed field: cf_EmbedUploadedFilesToDoc = change the code to use sessionAsSigner to access and save document
2) Custom control: browser_uploadFiles
a) Button: button1 (Upload and save files) = same thing change the code to use sessionAsSigner
Example: browser_uploadFiles
// Get the current document and it's changes</div>
<strong>var dbC:NotesDatabase = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath());</strong></div>
<strong>var thisDoc:NotesDocument = dbC.getDocumentByUNID( authDoc.getDocument(true).getUniversalID() ); </strong></div>
</div>
// Set the authorization key to used</div>
<strong>thisDoc.replaceItemValue("$PublicAccess","1");</strong></div>
thisDoc.replaceItemValue("IsUsed","true");</div>
thisDoc.replaceItemValue("file_Storage","local")</div>
thisDoc.save();</div>
I can send you both custom controls with the fixed code if you want.
<strong>// Get the current document and it's changes</strong></div>
<strong>var dbC:NotesDatabase = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath());</strong></div>
<strong>var thisDoc:NotesDocument = dbC.getDocumentByUNID( authDoc.getDocument(true).getUniversalID() ); </strong></div>
<strong>// Set the authorization key to used</strong></div>
<strong>thisDoc.replaceItemValue("$PublicAccess","1");</strong></div>
<strong>thisDoc.replaceItemValue("IsUsed","true");</strong></div>
<strong>thisDoc.replaceItemValue("file_Storage","local")</strong></div>
<strong>thisDoc.save();</strong></div>
<strong>// Get the current document and it's changes</strong></div>
<strong>var dbC:NotesDatabase = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath());</strong></div>
<strong>var thisDoc:NotesDocument = dbC.getDocumentByUNID( authDoc.getDocument(true).getUniversalID() ); </strong></div>
<strong>// Set the authorization key to used</strong></div>
<strong>thisDoc.replaceItemValue("$PublicAccess","1");</strong></div>
<strong>thisDoc.replaceItemValue("IsUsed","true");</strong></div>
<strong>thisDoc.replaceItemValue("file_Storage","local")</strong></div>
<strong>thisDoc.save();</strong></div>
<strong>// Get the current document and it's changes</strong></div>
<strong>var dbC:NotesDatabase = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath());</strong></div>
<strong>var thisDoc:NotesDocument = dbC.getDocumentByUNID( authDoc.getDocument(true).getUniversalID() ); </strong></div>
<strong>// Set the authorization key to used</strong></div>
<strong>thisDoc.replaceItemValue("$PublicAccess","1");</strong></div>
<strong>thisDoc.replaceItemValue("IsUsed","true");</strong></div>
<strong>thisDoc.replaceItemValue("file_Storage","local")</strong></div>
<strong>thisDoc.save();</strong></div>