Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Is there any image upload constraint in Q2A?

+1 vote
asked Mar 13, 2015 in Plugins by gunrose

I have been trying this http://peatarian.com/blob/q2a-markdown-editor-master.zip modified version of the markdown editor that is able to upload images. I realized that it works very well for some images and it does not work at all for other ones. I would like to understand what is going on. So I am asking if there is some constraint anywhere in Q2A that I should take a look in order to understand what it is really going on.

Q2A version: 1.7.0

1 Answer

+2 votes
answered Mar 13, 2015 by pupi1985
edited Mar 13, 2015 by pupi1985

It is a bit hard to tell without the image files and their filenames. Adding them to the question would help a lot.

From Q2A's point of view you can only upload png, gif, jpg and jpeg files. Note that both, the extension and the actual content of the file is checked to match those formats. The plugin you're linking, at first sight, seems to perform a similar check to the one Q2A performs to make sure the content of the file matches one of the allowed formats. This means, no additional check seems to be added.

Q2A also checks file size. Opposite to what it would seem at first sight, this can be considerably complex stuff because there are limits in application logic (Q2A) and in Apache/PHP. In Apache/PHP, there are actually 2 checks: maximum attachment file size and maximum post size. Here is a related question.

If these approaches don't seem to be the cause of the issue, consider uploading a couple of images in order to be able to reproduce the issue. If you can also include your Apache/PHP settings, that's even better.

commented Mar 13, 2015 by gunrose
@pupi1985 Thank you! I really appreciate your answer. I can say that it is not a format problem because I am talking about jpg. I have to check these maximum attachment files configurations. They are probably the cause of the issue. Thank you. I did not know about this.