rejetto forum
May 26, 2012, 02:43:15 AM *
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: new events section or possible bug  (Read 281 times)
0 Members and 2 Guests are viewing this topic.
raybob
Tireless poster
****
Offline Offline

United States United States

Posts: 206



View Profile WWW
« on: October 30, 2011, 05:23:31 PM »

(I realize now this should be in bugs section...)

Rejetto in hfs.events can you make a section called [upload] or something similar where macros are executed before an upload starts?  For example, the following code under [request] does NOT stop an upload from occuring:

Code:
{.if|{.count substring|multipart/form-data|{.header|Content-Type.}.}|{:{.disconnect.}:}.}

I get this in the log:
Code:
if|1|{:{.disconnect.}{.break.}:}
    {.disconnect.}{.break.}
disconnect
    <div class=macroerror>macro error: disconnect<br>not supported or illegal parameters</div>
break
« Last Edit: October 30, 2011, 05:27:37 PM by raybob95 » Logged
rejetto
Administrator
Insane programmer
*
Offline Offline

Italy Italy

Posts: 11831


View Profile
« Reply #1 on: November 02, 2011, 02:52:02 PM »

it's because the [request] is fired when the whole http request (upload included) was received.
I agree that it would be good to get it (or another event) fired as soon as the header only is received.
I put it in the to-do list.


The error you get in the log is very strange. I don't get it.
I get the disconnection, but too late (when the file is already uploaded).
I guess your script is different than the one you posted.
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 May 24, 2012, 08:25:44 PM
anything