I've merged zauberfish's pull request, and sent one.
I've one question popping up just now, although its not an UploadField issue as such: Max filesize works on large files, as in bytes, but not on large files in pixels that are extremely compressed! Example: cad files. Once uploaded GD will (try to) load them in memory and that's when things can get really bad. I know it doesn't happen very often, but when it does...
A while back I created a 'hack' for the people at duurza.am on version 2.4 to take care of that. This impacts Upload and file syncing. Would it be an idea to do something similar for 3.0 - but then as a permanent fixture - or would you consider this too minor an issue?
Martine
$has_many breaks everything regarding the uploadfield.
Martimiz wrote
> Max filesize works on large files, as in bytes, but not on large
> files in pixels that are extremely compressed! Example: cad files.
> Once uploaded GD will (try to) load them in memory and that's when
> things can get really bad. I know it doesn't happen very often, but
> when it does...
Hi Martine,
I once created a workaround for this problem, maybe not the cleanest one, but it works. If gd comes across a huge file, it will run out of memory and PHP will stop with a fatal error every time it tries to resize that file.
My assumption was, that there is no way to predict at what file size that will happen (because of different compression levels) and I don't know of any other information that could prevent running out of memory, so there is no way to prevent the first crash
--
$this->errors[] = ...
return false; .... } |
||