[Building Sakai] How to get attachment content? (Assignment tool)

David Horwitz david.horwitz at uct.ac.za
Mon May 17 01:11:24 PDT 2010


Hi,

You will need to retrieve the actual content object (see the
ContentHostingService).

I suspect you will need to do something like:

- retrieve the contentResource
- write the content to a tmp file
- pass that to javac
- clean up the tmp file

Hope that helps

Regards

David

On 05/17/2010 08:36 AM, le tan vu wrote:
> Hi guys.
> I want to ask the simplest way to get attachment content. The scenario is:
> I submit the attachment in my assignment submission. After that, the tool
> will get content of my attachment to test with compiler. (only 1 attachment)
> I use the following to try:
> Process p = Runtime.getRuntime().exec("javac
> "+sAttachmentReference.getEntity().getReference());
> But it display error file not found.
> Please instruct me.
> Thank you!
>
>   
>
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20100517/f0d40e82/attachment.html 


More information about the sakai-dev mailing list