---
title: "Comment by Steve Johnson on \"How to access the webcam and take photos with XPages\" | Hashnode"
description: "Chris this is a great resource. Thanks for sharing. No problems creating the png file on the server, however I am trying to store the image directly in a Notes"
url: "https://hashnode.com/posts/how-to-access-the-webcam-and-take-photos-with-xpages/5fcf5528d639be20b2f02739/comment/60885a04d73f1a2dea28bccd"
---

[Discussion](https://hashnode.com/posts/how-to-access-the-webcam-and-take-photos-with-xpages/5fcf5528d639be20b2f02739)

Comment [How to access the webcam and take photos with XPages](https://hashnode.com/posts/how-to-access-the-webcam-and-take-photos-with-xpages/5fcf5528d639be20b2f02739)

[Steve Johnson](https://hashnode.com/@SteveUYS)

[Apr 27, 2021](https://hashnode.com/posts/how-to-access-the-webcam-and-take-photos-with-xpages/5fcf5528d639be20b2f02739/comment/60885a04d73f1a2dea28bccd)

Chris this is a great resource. Thanks for sharing. No problems creating the png file on the server, however I am trying to store the image directly in a Notes document. I haven't got there yet!

[Chris Bekas](https://hashnode.com/@chrisbekas)

[Apr 27, 2021](https://hashnode.com/posts/how-to-access-the-webcam-and-take-photos-with-xpages/5fcf5528d639be20b2f02739/comment/60885a04d73f1a2dea28bccd#reply-60889a834102cb3d97bffb69)

Thanks Steve, appreciate the feedback!

Once you have the image file on the server you can get hold of the file from the path and then embed it into a Rich Text field of your notes document, e.g.

var rtitem:NotesRichTextItem = doc.createRichTextItem("Body"); rtitem.embedObject(NotesEmbeddedObject.EMBED\_ATTACHMENT, "", "c:\\temp\\webcam.png", null); doc.save();
