Attaching files through notes client and viewing through web

Hi,

I have one form in my database that i am using for both notes and web. The use of this application is such that, the composer creates a document from the notes client and the readers of the document access this document from the web.

Now, there is one rich text field on the form. When composer attaches a file to the document through this rich text field, the file is visible when the document is opened from a view in notes client but nothing is visible when the document is opened through web.

Any idea is appreciated

Thanks in Advance,

Dipen

Subject: Attaching files through notes client and viewing through web

I use different things: for Notes users I use RichTextField; for Web I use FileUpload control. But the problem: You can’t use RichTextField for Web rather you can’t use FileUpload control for Notes.

Subject: RE: Attaching files through notes client and viewing through web

Thanks for you reply mikhail…

But I think i havent made the situation clear.

The users are not allowed to attach files through web. They are only the readers of the document. I just have to display the files attached by the composer of the document(through notes client) on the web. Thats it.

I am waiting for your reply,

Thanks again

Dipen

Subject: RE: Attaching files through notes client and viewing through web

I’m sorry, but I think it is impossible(It is just my thought).

You can use Create-Attachment, but it is only for Designer.

I guess that it is possible to use separate FileUpload for Web, and RichTextField for Notes, but not for both of them in the same time…

Subject: Attaching files through notes client and viewing through web

You can create a web link to all attachments using the format:

http://server/db.nsf/ViewUNID/DocumentUNID/$File/xyz.pdf

to get the filename “xyz.pdf” in Computet Text use @AttachmentNames

So it would look like:

url:=“http://server/db.nsf/ViewUNID/DocumentUNID/$File/”;

filename:=@AttachmentNames;

@Implode(“”+filename+“”; “
”)

Subject: Attaching files through notes client and viewing through web

There’s a good chance I’ve not understood this so apologies in advance If I haven’t.

Perhaps if you create 4 subforms - two to display on the web and two to display in Notes - you might get the result you are looking for.

In one subform add a computed for display text field called $V2AttachmentOptions and put “0” in it. Make it hidden and load it for web browsers.

In another subform add a computed for display text field called $V2AttachmentOptions and put “1” in it. Make it hidden and load it for Notes clients.

In another subform add 2 rich text fields called Body and Body_1. Place

and
around the body field. Also add a computed for display text field called, say, DisplayAttachments, and in it place a formula similar to this to present the attachments neatly (you might want to hide it if @Attachments=0):

DBName := @ReplaceSubstring(@Subset(@DbName;-1);“\”;“/”);

len:=@Text(@Round(@AttachmentLengths/(1024*1024);0.01);“F”)+" mB);

res := @Implode(len+“<a href="/” + DBName + “/” +@Text(@DocumentUniqueID) + “/$file/” + @AttachmentNames + “">” +@AttachmentNames + “”;“
”);

@If(@IsError(@Round(@AttachmentLengths/(1024*1024);0.01));“”;res)

Make this subform load for web browsers.

In another subform add 2 rich text lite fields called Body and Body_1. Allow the Body field to store attachments only and allow the Body_1 field to store whatever else you want. Make this subform load for Notes clients.

As I say, I may not have understood the issue but this may help if I have.