How can limit the files size?
I have to limit the upload file size in file download section of Drupal but not runs well?

I have set the upload limt on 50k and the users upload 3mb perfectly.
Please help.

Comments

jpetso’s picture

Version: 5.x-1.x-dev » 5.x-2.2
Category: support » bug

Still an issue in 2.x at the moment, but yeah, this is a major bug and should be solved. Rebranding this as bug report instead of support request.

jpetso’s picture

Title: How can limit the files size? » Upload limit settings are not respected

And maybe some more explanatory issue title as well.

anantagati’s picture

When uploaded file is bigger than allowed size it shows this error:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM content_ WHERE vid = 0 LIMIT 0, 1' at line 1 query: SELECT FROM content_ WHERE vid = 0 LIMIT 0, 1 in D:\xampp\htdocs\drupal5\includes\database.mysqli.inc on line 151.

And until page reload there is not possible to upload another file (even file which is smaller that maximal allowed size) and 'Allowed extensions' are empty.
.

dopry’s picture

Status: Active » Closed (won't fix)

the content_ issue is a busted post... the max sizes are checked in file_save_upload.. not in filefield.. we won't be able to fix that issue here.

jpetso’s picture

Status: Closed (won't fix) » Active

No, the max sizes are defined by upload.module and checked in _upload_validate()... do we want to support those, or disregard them as upload.module specific settings?

dopry’s picture

Status: Active » Closed (won't fix)

In D6 they are centralized... so no we won't support them in D5 just yet. There is a feature request for per field upload limits I will consider.