[Building Sakai] Help! Content Tool (Sakai 2.6.3)

Claudia Roberta claudia.icmc at gmail.com
Fri Mar 23 15:44:37 PDT 2012


Hi guys,

  I'm working on Content Tool of Sakai 2.6.3. The idea is to add a checkbox and
check it, if the User wishes to send the zip file uncompressed or not. If
the zip file is uncompressed, each file must be included in the database and
displayed in the files list of the resources.
  I included the code to unZip (and saved it in the file system to test, and
I open the file normally), I created a new FileItem and I used the method
AddFile() from MultiFileUploadPipe:

FileItem newFileItem = new FileItem(entryName, mimeType, buffer);
ResourceToolActionPipe newPipe = mfp.addFile();
newPipe.setContent (buffer);
newPipe.setFileName (entryName);
newPipe.setMimeType (mimeType);
newPipe.setRevisedContent (buffer);
newPipe.setRevisedListItem (newFileItem);

The new files are displayed in the list along with the files added to the
resources and data are correct. The problem is when I open the file, it gives
an error corrupted file.

I did not add the ContentEntity:

newPipe.setContentEntity (arg0);
As I added new files, I could not create a new ContentEntity. Therefore, as in
the above code, I added only the byte [].

Someone help me?

Tks,

Claudia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120323/6e5a62cb/attachment.html 


More information about the sakai-dev mailing list