On Wed, Feb 13, 2013 at 8:15 PM, zacharykane <[email protected]> wrote:
I think I should maybe put this another way.
What I'm trying to do is add an attachment to a page that is a remotely available image file. The way the process is desired to work is that the user doesn't have to download this image and then use the attachment form on the page manually. Rather, they'd like to know if it can be taken care of programmaticly.
I made an assumption of the REST API based upon the example of creating a Page. It seems that this won't be the same process with creating files - at least from a purely JavaScript perspective. Using Velocity can I achieve something like this server side?
Sorry but I don't quite understand what you want to achieve. If the image is available elsewhere you have two options: 1) Either you link it directly in the page using a URI (i.e., the URI of the image) 2) If you want to have the same image also attached to the page (i.e., having a copy of it on the page) you still need to retrieve the actual binary data of the image and then PUT it as the attachment to the page as I told you earlier. Creating an attachment that is a symbolic link to another file on the web doesn't work because attachments are not post-processed, so an attachment containing a URI-link to an image would be just be plain string of character making up the URI, and not the referenced image. Hope this helps. -Fabio
-- View this message in context: http://xwiki.475771.n2.nabble.com/create-attachment-with-Rest-API-tp7583867p... Sent from the XWiki- Dev mailing list archive at Nabble.com. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs