I have only found one post about this issue. It states it was fixed in the latest dev.

I have the latest dev and is not fixed. Cannot upload any thing with media assist media selector.

And do not respond about PHP setting blah blah blah. I have many sites uploading 1500 MB as a limit and all work fine.

Regular file upload in drupal 7 works fine too.

Media selector shows "upload file size must be less than 0 bytes"

I need this fixed or at least info on where this can be set.

Comments

wolf125’s picture

There are more than one files that can restrict upload file sizes. I would check that all of those allow you to upload larger files, if you haven't done that.
I am having the same issue trying to get flash files onto my site, allowing users to Upload swf files. The default for media files seems to be 0. I will look into it as I have the same problem.
When I figure it our I will reply further.

tomasbedrich’s picture

For everyone, who has this problem with version Media 7.x-1.x-dev - here is the solution:
1) open sites/all/modules/media/includes/media.variables.inc
2) find line 133 (or somewhere around)
3) insert your desired filesize - for example: 'max_filesize' => '3 MB',
4) open PhpMyAdmin
5) run SQL command: DELETE FROM variable WHERE name = 'media__max_filesize'
6) clean cache
I hope that maintainers of media module will fix this issue soon. It's really terrible work to find bug like this one...

sheshkovsky’s picture

when I run this query: DELETE FROM variable WHERE name = 'media__max_filesize' , it replies : 0 rows deleted. ( Query took 0.0052 sec ).
so the limitation doesn't change for me. what should i do now?

tomasbedrich’s picture

Then it should work for you. Because if you don't have this row in variable table so it means, that Drupal should get the max_filesize from file sites/all/modules/media/includes/media.variables.inc as you set before.

thinkdrupal’s picture

As an admin there is no restriction.

For other users you need to do the following as a workaround..
In /includes/media.pages.inc look for function 'media_add_upload'. Your new code should look like this..

// Validate file size but do not allow anything higher than file_upload_max_size().
$max_filesize = file_upload_max_size();
// if (!empty($params['max_filesize']) && $params['max_filesize'] < $max_filesize) {
// $validators['file_validate_size'] = array(parse_size($params['max_filesize']));
// }
// elseif (($tmp = media_variable_get('max_filesize')) && $tmp < $max_filesize) {
// $validators['file_validate_size'] = array(parse_size($tmp));
// }
// else {
$validators['file_validate_size'] = array($max_filesize);
// }

This will pull the max file upload size from you php settings.

Using version ..7.x-1.0-rc2 of media

memoo’s picture

I increased the upload_max_filesize and post_max_size in my .htaccess. The upload seems to work now but results in a 'media_fid_illegal_value' ...

Running 7.x.1.0-rc3

maxheight’s picture

I'm having the same problem. I've edited the media.variables.inc file and tried to modify the sql field as listed above, but that field doesn't exist. I cleared the cache and tried to upload a media file and still see the 0 byte limitation.

tomasbedrich’s picture

And do you test on non-admin account? Because admin has no limits.

lomo’s picture

Really this should be in the issue queue for the media module. Doing a quick search there, the only issue that looked likely to be involved was:
#1356760: Plupload: Forward medias filesize limit value to plupload

The "0 KB" limit sounds like a place (somewhere) where '0' is intended to mean no limit (normally just for admin) and it's somehow getting mistakenly parsed as an actual 0KB limit in this module. I've seen such limits in some module configurations, but haven't used Media yet.

See you at the Drupalcon!

Harvey51’s picture

This article is old but the principals are the same:

http://drupal.org/node/97193

php.ini files should override Drupal settings.

lomo’s picture

But the impression I'm getting is it has nothing to do with the php.ini upload limits and more to do with a standard '0' entry (commonly used for "no limit" in various Drupal modules' configuration, e.g. IMCE) getting translated to an actual "no file size allowed" (i.e. a 0 KB limit). Having looked a bit longer at the issues for Media, I don't think the issue I linked earlier is related, so this could be a new issue to report. (I'll leave reporting this issue to someone who has actually replicated it.)

See you at the Drupalcon!