Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxFileSize settings not working #4

Open
conanedogawa2 opened this issue Oct 26, 2018 · 6 comments
Open

MaxFileSize settings not working #4

conanedogawa2 opened this issue Oct 26, 2018 · 6 comments

Comments

@conanedogawa2
Copy link

Hi everyone.

DokuWiki is installed on a docker container (with nginx+php7).

Note : The max file size for nginx and php7 has been increased to 10M. BTW it works. I can upload photos largers than the originally 1M size (tried 5M and it works like a charm).

Now, what happen if i change the maxfilesize settings to 4097152-(4Mo) in the plugin settings.
When i try to upload files < 2MB it works.
When i try to upload files > 2 MB it fails, like before.

I have to say that the parameters is indeed changed (the form with hidden "name="MAX_FILE_SIZE" is showing me the "4097152" number not the default one.)

Thanks for your help.

Great Plugin btw.

@qky666
Copy link
Owner

qky666 commented Oct 29, 2018

Hi,
I've been testing this, and I don't know whats happening, but it seems that there is a problem here. What I see is that "larger" files are uploaded (I've tested with a 13MB file), but the process that converts it to dokuwiki syntax never ends. The browser gives me a timeout. I'll try to investigate this, but my PHP skills are not so good...

@conanedogawa2
Copy link
Author

Hi,
Thanks for your reply.

What happen if you try with smaller files ? Like 5 to 10 mo.

It's not showing me timeout, but
"odtplus2dw : er_file_upload : Something went wrong with the file's upload : 1
odtplus2dw : er_checkUploadResult : Something is wrong with the uploaded file
odtplus2dw : er_pg_dir : Unable to remove the temporary directory : /
"
And this almost instantly since the file is more than exactly 2Mo.

Since those errors appears every time something bad is done, i dont't really think this is helpful.
I tried with verbose log enabled but there is no more logs than what is displayed in th UI.

Have a good day :).

@qky666
Copy link
Owner

qky666 commented Oct 29, 2018

Hi,
Mmmm... This is not happening to me. I tested it again (with different files) and it worked even with a 10Mb file (maybe the file I was using yesterday has something that breaks conversion, with some others it works ok).
I get the errors you get only when I push "upload" without previously selecting a file... Not sure what is happening to you.
By the way... Have you updated the plugin to the latest version? There was a problem with file names containing spaces. Don't know if that is the problem, but maybe you can try.

@conanedogawa2
Copy link
Author

I made the update annndd... :

odtplus2dw : er_file_upload : Une erreur s'est produite avec le fichier envoyé : 1
odtplus2dw : er_checkUploadResult : Le fichier envoyé semble incorrect
odtplus2dw : er_pg_dir : Suppression du répertoire temporaire impossible : /

In french this time :).
I tried with a very long Lorem Ipsum text, same error. (4mo)
I don't understand why this is happening. I suspect the maxFileUpload parameters fulfilled in the conf UI isn't taken since it happens only with odtplus2dw.

@qky666
Copy link
Owner

qky666 commented Nov 8, 2018

I really don't know how to help you... The only place in code where MaxFileSize is used is in hidden tag name="MAX_FILE_SIZE" (I think), so if it is working OK there should be no problem

@mr-floppy
Copy link

mr-floppy commented Feb 4, 2019

The MAX_FILE_SIZE field seems to have no effect indeed.

What you have to do is to allow you php.ini to upload bigger files.
https://www.dokuwiki.org/faq:uploadsize

It is not enough to adjust the nginx config. You have to make sure

php_value upload_max_filesize 2M
php_value post_max_size 8M

are big enough. Otherwise dokuwiki will reject the upload.

You can check the value easily via the dokuwiki upload page.
It says something like "Max. 2 MB per File-Upload." on the bottom, which is a value it gets directly from the php.ini
https://forum.dokuwiki.org/thread/9462

P.S.: This is of course still true for https://github.com/qky666/dokuwiki-plugin-file2dw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants