Forum OpenACS Q&A: Upload of multiple files doesn't seem to work?!

Hi all,

I tried to upload a zip files containing interlinked html pages with pdfs, graphics and more. All files a ordered in folders and no absolute pathes are used. But what is often used are uplinks from deeper folders like

<img src="../../images/spacer.gif">

or anchors

<a href="../slides/presentation.ppt">Slides</a>.

I expected the file storage to create the same folder structure as is inside the zip file an interlink the files but what it does is it creates all files in a flat structure inside the folder where I uploaded the file and some links are even broken.

Shouldn't the structure be the way the author defined in the zip file?

Greetings,
Nima

Collapse
Posted by Staffan Hansson on
Yes indeed it should, Nima, but that functionality is not yet implemented. Polyxena actually has an unfinished archive uploader for File Storage that we've been seeking funding to complete and release. See this post:

https://openacs.org/forums/message-view?message_id=113215

(The demo is down, but it's an archive uploader that does what you want.)

In the absence of financing, Ola's implementation, though mainly completed, is on ice. Meanwhile, Lars has added a simple bulk upload feature that doesn't fully solve your needs, as you've noticed. See this bug:

https://openacs.org/bugtracker/openacs/com/dotlrn-fs/bug?bug%5fnumber=930

It would be great if we could get our sleeping beauty into the toolkit. 😊

Collapse
Posted by Ernie Ghiglione on
Hi Nima,

If you are daring enough to work on this, on the LORS package (https://openacs.org/forums/message-view?message_id=160385) I released, there's a lors::imscp::expand_file that unpacks a .tgz or .zip file into a tmp directory (creating all the subdirs and all) and then there's a bunch of functions that allow you to add files and directories to the content repository:

# lors::cr::add_files (public)
# lors::cr::add_folder (public)
# lors::cr::has_dirs (public)
# lors::cr::has_files (public)

They replicate the exact same copy of the file-system to the CR. There's an example of the use of them on the random package that I use as UI for the LORS package... have a look here:

http://mlweg.pc.ee.usyd.edu.au:8080/files/view/20040309_random.tgz

I hope this helps,

Ernie

Collapse
Posted by Nima Mazloumi on
Where can I find your package? Under CVS?