Image bug upload link

Please report bugs here!

Moderator: Thorsten

Post Reply
Novaslash
Posts: 5
Joined: Mon Jun 29, 2020 6:00 pm

Image bug upload link

Post by Novaslash »

Hello

I have a problem uploading images when I create an article. While searching the Internet, I came across a subject from this forum dating from 2018 having the same concerns but the answer was not given.

The concern is that if I take an image from my hard drive, I have a blue square when writing but also when a visitor looks at a FAQ.
However, the image does appear in the 'images' folder.

In the faqdata table, the link is "../images/1594053838avatar-kira2.jpg". If I remove a point, it works and if I remove '../', it also works.

I came to the conclusion that since the files concerning the administration are in a sub-folder, it makes sense to go back from a folder to insert the image in the 'images' folder but when we look at an article, we are at the root of the FAQ so the image link should logically be "images / 1594053838avatar-kira2.jpg".

On the other hand, I don't understand why it is displayed well when creating / editing an article after the modification in the table since we are in the 'admin' folder and not in the root.

I am not at all an expert in php but I try to find a solution to automatically remove the '../' in the table when we validate an article.

What is the solution because it is very annoying?

Thank you.

Ps : I am in version 3.0.3

PS2 : PS: if I modify the line "$ uploadDir = '../images/';" in 'ajax.images.php' (it seems to be the right file) by removing a point or '../', it does not work the image is obviously no longer upload in the folder.
blondin62
Posts: 38
Joined: Sun Mar 11, 2018 11:06 am

Re: Image bug upload link

Post by blondin62 »

hello

I had the same problem and I am opening a bug case:
viewtopic.php?f=3&t=42958
"Download and view the image does not work in 3.0.3"

apparently it's because I'm not directly on the root directory but on my own directory.
i indicate a workaround
Thorsten
Posts: 15560
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Image bug upload link

Post by Thorsten »

Hi,

I'm working on a fix for 3.0.4!

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply