Asiri Rathnayake wrote:
Hi,
1) Upload the file as an attachment just as before.
> 2) Make a second rpc call. This RPC call will import the latest attachment
> to the current page by the current user. This way we don't need to worry
> about crappy file names and browser specific stuff.
This solution is acceptable in most of the cases (provided you look for
both new and updated attachments), but not bullet proof. Ideally, the
upload action should tell us the name of the added/updated attachment.
A hackish solution would be to use the xredirect hidden input in the
upload form and make the upload action add the name of the attachment in
the query string. This way you could force the upload action to redirect
to an URL like /Space/Page?xpage=plainAttachmentName&attchmentName=foo.
I don't know the details though so it might now work.
Marius
I Implemented this approach and it works fine and fixes both the issues
http://jira.xwiki.org/jira/browse/XWIKI-3288 and
http://jira.xwiki.org/jira/browse/XAOFFICE-10
Still I'm wondering if this is the correct approach or not. I won't commit
the code for the moment, in the mean time if you have any comments please
let me know.
Thanks.
- Asiri
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs