Native XML Plugin import "File size error."


I tried to import a XML file with “Native XML Plugin” (the file was initially exported with the same plugin), and it gives me the error “File size error.” before I can click on “Import” so I think it’s a JS function that’s doing this. But I can’t figure out where I can change the allowed size - any ideas?

I think this is related to Plupload JS maxSize, but don’t really know how to change this.

Thank you!

Hi @Alex_Protopopescu

Which OJS version are you using? It could be that this is a restriction on your server. In that case, you can check and change it in your php.ini file.


OJS3, I tagged the Q but forgot to specify in the text. Thank you Bozana! One thing led to another and I did arrive at the same conclusion.

Apparently the max size value it’s taken by lib/pkp/classes/core/ from the php ini to Plupload JS which handles the upload.
In this case ‘upload_max_filesize’ (and consequently ‘post_max_size’) must be set to the desired value in the php.ini file for the running PHP implementation. A php-fpm or web server restart is required.
If running php-fpm on nginx, then ‘client_max_body_size’ must also be set in http, server or location context in one of the nginx config files. A nginx service restart is required.

All good! Topic closed!

Great! Thanks for the good description – it is very helpful for others! :-)))

1 Like