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
var dbC:NotesDatabase = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath());
var thisDoc:NotesDocument = dbC.getDocumentByUNID( authDoc.getDocument(true).getUniversalID() );
// Set the authorization key to used
thisDoc.replaceItemValue("$PublicAccess","1");
thisDoc.replaceItemValue("IsUsed","true");
thisDoc.replaceItemValue("file_Storage","local")
thisDoc.save();
I can send you both custom controls with the fixed code if you want.
// Get the current document and it's changes
var dbC:NotesDatabase = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath());
var thisDoc:NotesDocument = dbC.getDocumentByUNID( authDoc.getDocument(true).getUniversalID() );
// Set the authorization key to used
thisDoc.replaceItemValue("$PublicAccess","1");
thisDoc.replaceItemValue("IsUsed","true");
thisDoc.replaceItemValue("file_Storage","local")
thisDoc.save();
// Get the current document and it's changes
var dbC:NotesDatabase = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath());
var thisDoc:NotesDocument = dbC.getDocumentByUNID( authDoc.getDocument(true).getUniversalID() );
// Set the authorization key to used
thisDoc.replaceItemValue("$PublicAccess","1");
thisDoc.replaceItemValue("IsUsed","true");
thisDoc.replaceItemValue("file_Storage","local")
thisDoc.save();
// Get the current document and it's changes
var dbC:NotesDatabase = sessionAsSigner.getDatabase(database.getServer(), database.getFilePath());
var thisDoc:NotesDocument = dbC.getDocumentByUNID( authDoc.getDocument(true).getUniversalID() );
// Set the authorization key to used
thisDoc.replaceItemValue("$PublicAccess","1");
thisDoc.replaceItemValue("IsUsed","true");
thisDoc.replaceItemValue("file_Storage","local")
thisDoc.save();