0

i am working on a FileUpload XPage.

What i am Trying to do: A user should be able to upload one ore more image files at once, these n files should be seperated on n number of documents. (one file per document).

For my first try i used the Async MultiFile Uploader Control from Ferry Kranenburg. I added some Code to the submit ('Upload') button to extract all Attachments from the document and move them to different new documents using following code to extract the files:

EmbeddedObject eo = (EmbeddedObject) vEObj.get(nextobject)
ImageInputStream IOStream = ImageIO.createImageInputStream(eo.getInputStream());
BufferedImage srcImage = ImageIO.read(IOStream);

For reasons i dont really know myself i have to change the Control from Ferry Kranenburg to the XPage Multiple File Uploader by Mark Leusink. I thought they work similar but with this control the line ImageInputStream IOStream = ImageIO.createImageInputStream(eo.getInputStream()); in my Code gives me the error: Invalid or nonexistent document

I found some Articles about the error, some say it is a bug, but in my first example it worked fine using the other upload control.

Has enyone encounterd the same problem before? Any workarounds or Ideas how to get this done is welcome.

Michael Saiz
  • 1,640
  • 12
  • 20
  • Make form and check documents created by both controls in Notes client - I suppose the attachments are stored differently. Options are different store (document/field level) and/or filename (attachment filename differs from the one you see in download control). – Frantisek Kossuth Jul 09 '13 at 17:20
  • I already compared the results i see no difference between them. If i dont use the code in the submit button it runs perfekt on both upload results. I am currently thinking of running the code in a agent wich will be triggered in the submit button maby this works. – Michael Saiz Jul 10 '13 at 05:24

0 Answers0