← Back to team overview

mahara-contributors team mailing list archive

[Bug 528500] Re: maxfilesize does not consider available quota on 'My Files' upload page

 

Hi Andrew,

Thanks for your patch. I've applied both it and the commit following it
to master. Both are good fixes!

Cheers,
Evan

** Changed in: mahara
    Milestone: None => 1.3.0

** Changed in: mahara
       Status: New => Fix Committed

** Changed in: mahara
     Assignee: (unassigned) => Evan Goldenberg (naveg)

-- 
maxfilesize does not consider available quota on 'My Files' upload page
https://bugs.launchpad.net/bugs/528500
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.

Status in Mahara ePortfolio: Fix Committed

Bug description:
If the php 'post_max_size' and 'upload_max_filesize' are higher than the
user's available quota, then the file upload interface suggests that the
user may upload a file up to the lowest of these two sizes.
In reality, you can only upload up to the available space in your quota and
an exception is thrown if you upload a larger file.

I've patched this in af0facaa676e716a29163c79e112fda0e54817fb on
http://git.luns.net.uk/mahara.git on the upload-quota branch by including
$USER->get('quota') - $USER->get('quotauser') in the min() which calculates
the most appropriate size.

Andrew





References