Pixelfed video size limits

What app is this about, and its version: Pixelfed 0.12.6~ynh2
What YunoHost version are you running: 12.1.39 (stable)
What type of hardware are you using: VPS bought online

Describe your issue

I’ve been trying to figure out how to get video uploads working on my YunoHost installation of Pixelfed, and I don’t even know what to make of this. I try uploading an .mp4, and get hit with an error reading: The file you uploaded has the size of 50.65 MB. Unfortunately, only images up to 195.31 MB are supported. Please resize the file and try again.

I’ve edited my .env file to enable various video filetypes, as well as enabled them all from the admin panel (it still doesn’t recognise .mov, but another problem for another day). I’ve cleared the cache using the following:

php /var/www/pixelfed/artisan config:cache

I can’t find any documentation or reports of anyone else encountering/solving this issue, so hopefully someone smarter than me can give me a clue as to where to look next?

Share relevant logs or error messages

I do have a log generated, but the forum is blocking me from pasting the link in the appropriate field because I’m too new a user.

Hello @ohyeahpaulchin

I assume you’ve set the max media size in Pixelfed>admin>media>Max Media Size. E.g 300MB.

  1. php-fpm needs to b configured accordingly:
    a) You can manually edit /etc/php/<your-php-version>/fpm/pool.d/pixelfed.conf and set upload_max_filesize and post_max_size to 300M . Note: each upgrade will reset those values.
    b) A more “robust” way to change those settings
yunohost app setting pixelfed php_post_max_size -v 300M
yunohost app setting pixelfed php_upload_max_filesize -v 300M
yunohost app ssowatconf
yunohost app upgrade pixelfed --force -b # /!\ -b = don't backup the app => adapt 
# this according to your needs
  1. the pixelfed domain nginx conf also needs to be updated. At the moment this can only be done manually (as far as I know).
nano /etc/nginx/conf.d/<your-pixelfed-domain>.d/pixelfed.conf
 # change the value of client_max_body_size : e.g  client_max_body_size 300M;
systemctl reload nginx

note: each upgrade will reset this value.

2 Likes

Amazing! Thank you so much @otm33! Gonna bookmark this for future builds/upgrades!

I just opened a PR. It adds a configuration panel to allow adjusting php_upload_max_filesize

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.