rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: rejetto on May 05, 2007, 12:47:09 AM

Title: folder archives
Post by: rejetto on May 05, 2007, 12:47:09 AM
I'm back on folder archives.
After many hours, i fixed tar compatibility, and now the generated archives should be perfect.
I just created a 7GB archive, with many folders and 1400 files. All went good.

I still have bugs with resuming (seeking in the middle of the archive), i need more time.
Tar format is very easy, so it's a good starting point. When this format will work flawlessly, i will try implementing another format, like zip or rar.

[attachment deleted by admin]
Title: Re: folder archives
Post by: TSG on May 05, 2007, 05:34:13 AM
:o nice, .zip is good for all round compatibility, .rar is also like that now with the latest winZIP archiver also opening .rar :), .tar i haven't really had much experience with but it seem my archiver here opens it :)

awesome cant wait for this!
Title: Re: folder archives
Post by: MarkV on May 05, 2007, 11:02:29 AM
Most commonly used ones were .ZIP, .ARJ, .LZH - nowadays .ZIP followed by .RAR.

.tar is commonly known in the *NIX world. .tar does not compress the data, only compact it into one file for further processing by gzip or bzip2.

Maybe even consider LZMA (7-Zip) as it is Open Source? http://www.7-zip.org


MarkV
Title: Re: folder archives
Post by: rejetto on May 05, 2007, 11:59:12 AM
compression is not acceptable
just storing
Title: Re: folder archives
Post by: traxxus on May 05, 2007, 01:27:56 PM
compression is not acceptable
just storing


whyyyyyy nooot ?  ;D  :P
Title: Re: folder archives
Post by: rejetto on May 05, 2007, 01:31:07 PM
think of tens people who have the power to start compressing huge archives on your machine, just by clicking on a link.
brrrrrrrr


another big problem: the archive would not be resumable.
Title: Re: folder archives
Post by: TSG on May 05, 2007, 01:37:11 PM
Yes i don't agree with compression, it risks crashing the host pc, compressing any archive causes a pc to use a lot of cpu, if you get many connections trying to do the same thing BOOM cpu overload and computer crashes, but the ability to gather all the files within a folder together and download them is perfectly fine, and if .tar achieves this then use it!
Title: Re: folder archives
Post by: MarkV on May 05, 2007, 09:39:54 PM
No problem, my archiver of choice (7-Zip) fully supports tar archives. Maybe it would even be possible to reverse the process, the user creates a .tar of the folder to upload and HFS de-compacts when upload is finished. BAM, folder uploaded. Just a thought...


MarkV
Title: Re: folder archives
Post by: TSG on May 07, 2007, 05:57:59 AM
ok this is strange... i woke up this morning to find my secondary virus scanner 'AVG free 7.5' had detected a virus... and the virus was related to a file in my archive software 'winRAR' ... it said it was a 'generic trojan downloader 4' i don't remember the exact file now cause i quarantined and removed it as fast as possible... it was a .SFX extension within the dir of winRAR... anyway, its fixed now, just thought i would bring it up as i have only extracted the .tar files from HFS #100 recently with testing. Probably totally unrelated but i just found it a bit to close to home to just not bother posting it up here.  :-\

EDIT: Anyhoo on further downloading and extracting/ virus scanning i cannot replicate the issue so it is most likely totally unrelated  :).


P.S. Its working perfectly, just wish we could restrict its usage to accounts.
Title: Re: folder archives
Post by: Alons0 on May 07, 2007, 06:55:53 AM
Does this option work (arhiveing)? If it works is there a symbol or something which is need to be pasted in the template?
Title: Re: folder archives
Post by: TSG on May 07, 2007, 10:41:09 AM
All you have to do is put ' ~folder.tar ' on the end of your url for the folder you want to archive download, this can of course be used in the template... <a href="%item-url%~folder.tar"><img src="/~img33" alt="Download Archive" align=top></a>
Title: Re: folder archives
Post by: Guest on May 07, 2007, 06:14:49 PM
I'm missing something, obviously.
How do you limit the folder archive feature to the contents
of certain folders ? I can't see using it without that.
Title: Re: folder archives
Post by: Alons0 on May 08, 2007, 12:25:50 PM
All you have to do is put ' ~folder.tar ' on the end of your url for the folder you want to archive download, this can of course be used in the template... <a href="%item-url%~folder.tar"><img src="/~img33" alt="Download Archive" align=top></a>
Hey i put <a href="%item-url%~folder.tar">Download archive</a> but when i point the link is for example http://10.6.13.25/mp3/%item-url%~folder.tar
It doesn't work. Why? I try to open http://10.6.13.25/mp3/~folder.tar and then the browser allows me to download the folder archive. But why there's a bug with %item-url%
EDIT: I found the problem the link must be only "~folder.tar"
Title: Re: folder archives
Post by: Foggy on May 08, 2007, 01:06:03 PM
Im not sure if im right but ill try anyway
When hfs see's %item-url% it replaces it with the url so if you put %item-url% in a browser it will just get an error because it has no idea what it is refering to and if you can understand what i just said your doing alot better then me, LOL  ???
anyways i hope that helped in some way
i just had a second thought which might help if you dont understand what i just wrote up top because if i didnt write it id be thinking...
the reason why you only need ~folder.tar is because %item-url% represents http://10.6.13.25/mp3/
before i think of some other thing that will confuse myself i should goto bed and get some shut eye
Title: Re: folder archives
Post by: TSG on May 08, 2007, 02:17:24 PM
<a href="%item-url%~folder.tar">Download Archive</a> this would depend on your template. It works fine in mine :) basically all that has to be done is to put ~folder.tar on the url then it works.
Title: Re: folder archives
Post by: Alons0 on May 08, 2007, 02:36:44 PM
Ok people :D
I wanna this link to be displayed only in a folder (without root). How can I make it with JavaScript?
Title: Re: folder archives
Post by: Giant Eagle on May 08, 2007, 03:09:47 PM
Code: [Select]
<script type="text/javascript" language="javascript">
if ("%folder%" != "/") {
document.write ("<a href=\"%folder%~folder.tar\">Download Archive</a>");
}
</script>

or 1 line code

Code: [Select]
<script type="text/javascript" language="javascript">document.write("%folder%" != "/" ? "<a href=\"%folder%~folder.tar\">Download Archive</a>" : "");</script>
Title: Re: folder archives
Post by: Alons0 on May 08, 2007, 07:07:19 PM
Thank you Giant Eagle!
Rejetto, hfs will be good if works with rar archives :D
Title: Re: folder archives
Post by: MarkV on May 08, 2007, 11:41:35 PM
Why? What's wrong with .tar? There won't be any compression so it doesn't matter. And WinRAR can extract .tar, too.
.rar would be more interesting if the process could be reversed, like uploading an archive and have HFS decompact it.


MarkV
Title: Re: folder archives
Post by: TSG on May 09, 2007, 05:22:15 AM
Why? What's wrong with .tar? There won't be any compression so it doesn't matter. And WinRAR can extract .tar, too.
.rar would be more interesting if the process could be reversed, like uploading an archive and have HFS decompact it.

lol you contradicted yourself, hfs will never decompact, just create and extract, but that is a very good idea, maybe we can let people upload '.tar' archives and have an option for hfs to automatically extract them all into the upload folder or something... would be handy for uploading into image galleries etc...  '.tar' is fine, there is no need to make rejetto create other archive types if this gives us the functionality needed to do the job. All we need now though is a way to restrict who can download as archives, and what folders can be archived.
Title: Re: folder archives
Post by: MarkV on May 09, 2007, 06:02:01 AM
decompact vs. extract

English isn't my first language, I think I used a wrong word then...
Title: Re: folder archives
Post by: Giant Eagle on May 09, 2007, 09:58:27 AM
If hfs can extract a .TAR file, then creating folders remotely will finally be a fact. ^^ hurray!
Title: Re: folder archives
Post by: jack_2000 on December 14, 2007, 03:25:49 PM
I like the idea of uploading a tar then hfs could expand it to a folder.
Maybe an option(checkbox)?
Title: Re: folder archives
Post by: rejetto on December 14, 2007, 04:19:35 PM
yes, it was already suggested but i forgot to put it in the to-do-list
Title: Re: folder archives
Post by: bacter on December 14, 2007, 09:20:14 PM
if someting like extract will be included in hfs it should be a option. Normally i think admin will look at the contents of a tar, zip or rar, before expanding content. With automatic extact the filesystem can get very 'sick'  :D
Title: Re: folder archives
Post by: jack_2000 on December 16, 2007, 09:40:44 PM
noted
Title: Re: folder archives
Post by: Mars on December 16, 2007, 11:25:29 PM
why extract a .tar ? We can have an option which authorizes the view and the download of the contents of a file .tar (as zips files under windows)

For that, Hfs can create a file .tar as being a temp virtual folder to which we can apply  the ~folder.tar for the download