rejetto forum
May 25, 2012, 05:06:26 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Disable ZIP download if folder bigger than 2GB?  (Read 1341 times)
0 Members and 1 Guest are viewing this topic.
Novox
Experienced poster
***
Offline Offline

Thailand Thailand

Posts: 84


View Profile Email
« on: May 25, 2010, 03:58:01 AM »

Hello rejetto,

Is it possible, if I want to make an event that disable download as zip's button when the folder is bigger than 2GB?

Thanks in advanced!
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #1 on: May 29, 2010, 01:15:45 PM »

maybe it's possible to make a [download] event where you call a command-line utility to get the size of the archive.
anyway, this is not a good method, because the archive is not necessarily a full folder.
problem is, the [download] event is fired before the archive is calculated (and this must stay this way), so hfs cannot even pass you the size.

i don't know if we should introduce a new event for archives.
opinions?
Logged
Novox
Experienced poster
***
Offline Offline

Thailand Thailand

Posts: 84


View Profile Email
« Reply #2 on: July 15, 2010, 01:30:44 AM »

Yeah, I think a new event for archive is required to solve this problem. Or can you give a archive setting option in HFS instead of using event script?
Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #3 on: July 27, 2010, 03:10:39 AM »

i found that event [archive name] is when the archive is ready.
so i just introduced a new symbol %stream-size% so you can now ALT+F6 and put this

[+archive name]
{.if|{.%stream-size% > 2000000000.}|{:
  {.disconnect reason|archive too big.}
:}.}

Follow members gave a thank to your post:

SilentPliz

For this post, 1 member gave a thank you!
Logged
Novox
Experienced poster
***
Offline Offline

Thailand Thailand

Posts: 84


View Profile Email
« Reply #4 on: July 27, 2010, 03:42:38 AM »

WoW Thank you very much rejetto! You are the best!

This will come in the new b263 right? I waiting for it Smiley
« Last Edit: July 27, 2010, 04:11:00 AM by Novox » Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #5 on: July 27, 2010, 08:57:34 AM »

yes

Follow members gave a thank to your post:

Novox, alex-870

For this post, 2 members gave a thank you!
Logged
rejetto forum
« Reply #5 on: July 27, 2010, 08:57:34 AM »

Do you like this software? Consider even $2
 Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page Today at 11:46:14 AM