How to put self-define restriction on uploading binary file

Author Message

Bill Smith

Thursday 21 December 2006 6:59:38 pm

For example, the upload file cannot be the exe file.

or for each user, the total uploading file size cannot exceed the defined total size limit

So where should I put these restriction?

I have gone through the kernel files related, but unluckily I didn't find where the uploading

action occurs.

I try to put the restriction in validateObjectAttributeHTTPInput method in

\kernel\classes\datatypes\ezbinaryfile\ezbinaryfiletype.php

but seems it only pop up the error message, but the content are still uploading.

Anyone can help? Thanks very much.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:28:48
Script start
Timing: Jan 31 2025 06:28:48
Module start 'layout'
Timing: Jan 31 2025 06:28:48
Module start 'content'
Timing: Jan 31 2025 06:28:49
Module end 'content'
Timing: Jan 31 2025 06:28:49
Script end

Main resources:

Total runtime0.7009 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.3906151.2422
Module start 'layout' 0.00580.0032 739.632836.7109
Module start 'content' 0.00890.6912 776.3438822.1172
Module end 'content' 0.70010.0007 1,598.46097.7813
Script end 0.7008  1,606.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4514160.0002
Check MTime0.00130.1859160.0001
Mysql Total
Database connection0.00080.112710.0008
Mysqli_queries0.662794.5496460.0144
Looping result0.00040.0508440.0000
Template Total0.672095.920.3360
Template load0.00200.291820.0010
Template processing0.669995.589120.3350
Template load and register function0.00140.197710.0014
states
state_id_array0.00070.103710.0007
state_identifier_array0.00070.098420.0003
Override
Cache load0.00170.2407120.0001
Sytem overhead
Fetch class attribute can translate value0.00050.069610.0005
Fetch class attribute name0.00150.216510.0015
XML
Image XML parsing0.00010.012410.0001
class_abstraction
Instantiating content class attribute0.00000.000710.0000
General
dbfile0.00060.0924100.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
1content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 4
 Number of unique templates used: 4

Time used to render debug report: 0.0001 secs