If you are looking for code snippet, it goes like this. But keep in mind that your approach of storing a file on load(GET method) violates REST principles. Node folder = myResource.adaptTo(Node.class);JcrUtils.putFile(folder, "myfile.ics", "text/plain", instream);folder.getSession().save();