1
votes

I am able to add a file upload control to my page and add attachments. But how do I manage them? View , delete?

I added a computed field to my xpage and make the attachments field the source and set the field as HTML. I get a bunch of entries like (See attached file: abc.pdf). But that does not seem to do what I want.

Is there an easy way to manage these attached files?

2
"File Download" control?Panu Haaramo
Instead of attaching docs to the main notesdocument, I create children docs (1 per attachment) and then use a repeat control to source them to users. This also allows me to add attachments without doing a full refresh of my xpage - instead my upload control is in an iframe and THAT is full refreshed. To delete the user clicks an edit button which adds a delete X icon to the attachment. When that is clicked, the child doc is deleted.Michael G. Smith

2 Answers

5
votes

Bind a file download control to the same data the upload control is bound to. One of the attributes this component supports is a boolean for whether to allow deletion. You can also choose which attributes of each file it displays (MIME type, size, etc.).

0
votes

What is wrong with having an repeat control repeat over the filenames and generate links directly to those files where on the links there are event handlers which do a remove or view ?