Dear All,
I want to have a file upload mechanism in Notes Client such that after I upload a document, the attachment does not show as an attachment but the contents of the attachment becomes the contents of a page/form (as if whatever i want to upload, I just copy and paste it in a blank page/form).
The upload and display screen are separate.
Please suggest how to go about this requirement.
Thanks in Advance
–SOUMYAJIT
Subject: File Upload in Notes Client
I’m not sure what you mean by “document” here. Obviously you would have to be using a file of a type that you have software able to interpret its contents into Notes rich text somehow (because a form/page body is rich text, just like you would have in a document).
Probably the easiest way to do this conversion is by the import function which is available in the UI, if the file is of a type supported by import. Use the Import method of NotesUIDocument to read the contents into a document. Do not save the document. Use NotesUIDocument.Refresh(True) to make the rich text available thru the back end. NotesDXLExporter to export the document. NotesDOMParser to extract out the element describing the contents of the rich text field. Slap that rich text content into the middle of a pre-defined DXL definition for a blank form. NotesDXLImporter to create the form containing the rich text.
If the document is not of a type Notes knows how to import, but you have an API that will let you access the document’s contents and convert them to an importable format (HTML, say), then you can use that API to produce a temporary file which you can import as above.