Donmai

Maximum filesize

Posted under General

Is there any way around the filesize limit?

I'd like to upload the original version of post #2534638. It's 74.4 MiB in JPEG format and 10,665 x 15,000 px (sample). Using jpegtran's optimize feature only gets it down to 67.9 MiB.

I can understand wanting to discourage large images in general, since they're likely to be unnecessary PNGs or low-quality scans, but sometimes it's worth it.

I'm not even sure what the maximum filesize currently is. It doesn't seem to be mentioned anywhere that I can find.

Assuming that default values aren't changed on the actual production servers, the limit is 30MB for files uploaded directly from computer, and 35MB for files pulled over from an URL. I don't think there's a way around it; Danbooru has larger files, but they were uploaded many years ago, likely before limits were established. Maybe there should be a way to tell Danbooru to ignore size constraints for a given upload, but even if done it will be limited to admins because of DoS possibility.

Regarding that ugoira, one you can work around the limit is by converting it to WebM. Sure, it will get a md5_mismatch, but it's better than nothing. Whoops, I somehow thought you are talking about ugoira, not a single image.

Updated

Type-kun said:

Maybe there should be a way to tell Danbooru to ignore size constraints for a given upload, but even if done it will be limited to admins because of DoS possibility.

Do we not trust builders/janitors? I think it might make more sense to add it to the permissions for trusted users, alongside "approve posts" and "unrestricted uploads".

In any case if anyone does get the ability to upload large files, I'd request that they upload this one.

There are
~25 posts with a file size >35MB (all of them older than 4 years when probably no / a different limit was in effect)
~30 posts with a file size of 31-35MB
~110 posts with a file size of 26-30MB

(You can search by file size like: filesize:26M..30M)

So this seems rare enough to either a) do nothing b) implement the simplest option possible. Anything more complex, like a separate permission, seems overkill.

It's probably better to just upload a "normal-sized" version (i.e. smaller than 30MB) and post a file-hosting link of the original in a comment.

Viewing images that large through a browser is inconvenient anyway, to say the least.

I would do it but it feels better to just keep that hugeass 75 MB file on the server instead of linking to an outside file-hosting website. Most people are gonna view the 850px preview anyway and it's not like the original will drive up server bandwidth overnight. Wonder what @albert thinks of this.

Maybe just make the "unrestricted uploads" permission also let you bypass filesize limits? A contributor can upload a thousand 35MB files just as easily as they can upload a thousand 75MB files, so it's not like the filesize limit does much to prevent anyone from DoS'ing the site.

Since this is kind of an archive site, I think it'd be nice to have the best quality available saved here somewhere, rather than relying on file hosts that come and go. What's ridiculously high resolution now won't be forever. Of course it's albert's call, though, and I guess he's made his decision for now.

Reviving this thread because I'm running into an error that I suspect is resulting from some sort of filesize limit, but can't be sure.
Are videos capped at 10MB these days or something?

I'm trying to upload one of gobou_(gobou-san)'s videos, but I keep getting the error message

Error
Validation failed: Md5 confirmation doesn't match Md5
Details
ActiveRecord::RecordInvalid exception raised
app/logical/upload_service.rb:41:in `start!'
app/controllers/uploads_controller.rb:55:in `create'

and unfortunately I'm not much of a ruby guy. I tried uploading it both in mp4 and webm formats, and got the same error message in both.
Github says it was an issue for somebody else in the past, and didn't seem to be user error.

Updated

I believe the problem here isn't the filesize, what MD5 basically does is it checks that the file posted and the source posted are the same.
You could try putting the source after the upload, but if that error still persists then it's a problem of the upload itself.

Are you uploading directly from the source, or are you uploading from your computer? If it's the latter, than if you need to wait for the drag and drop area to turn green before it's safe to upload. If it's the former, than post the upload URL so that the developers can check it out.

Username_Hidden said:

I believe the problem here isn't the filesize, what MD5 basically does is it checks that the file posted and the source posted are the same.
You could try putting the source after the upload, but if that error still persists then it's a problem of the upload itself.

Hmm. That's really weird, because I just tried posting it without a source url as well, and it still failed. I'd assumed that this MD5 check was just validating the integrity of uploaded files.

BrokenEagle98 said:

Are you uploading directly from the source, or are you uploading from your computer? If it's the latter, than if you need to wait for the drag and drop area to turn green before it's safe to upload. If it's the former, than post the upload URL so that the developers can check it out.

From my computer, unfortunately. The error still appears even when I make sure to wait until the box has turned green.

The upload limit is 50MB. But there's a 60 second time limit for uploads, and if it takes longer than that, then the upload will be killed and you'll get weird errors.

(The time limit is because there has to be some kind of limit, we can't let people hang the server forever with slow uploads.)

evazion said:

The upload limit is 50MB. But there's a 60 second time limit for uploads, and if it takes longer than that, then the upload will be killed and you'll get weird errors.

(The time limit is because there has to be some kind of limit, we can't let people hang the server forever with slow uploads.)

So, I actually just tried the catbox.moe trick, which still gave an error, but this time it was one that made sense:

An error occurred: error: ActiveRecord::RecordInvalid - Validation failed: video must not be longer than 140 seconds

Which brings up a different, although related, question: why is there a video length limit if there's already a max filesize?

DownWithTheThickness said:

Which brings up a different, although related, question: why is there a video length limit if there's already a max filesize?

You can still have videos that are both longer than two minutes and smaller than 50 MB. YouTube and Newgrounds are better places for posting longer videos.

1 2