pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.66k stars 412 forks source link

Never see Images #653

Closed bernalau closed 7 years ago

bernalau commented 7 years ago

Expected behaviour

We can see image in a note.

Actual behaviour

Never see image

Steps to reproduce

Import by copy / paste or insert a file image

Output from the debug section in the settings dialog

Relevant log output (you have to enable enable the log widget)

bernalau commented 7 years ago

Hello.

I have this problem since the first use... I can insert file : i have a relative link to the file. The link work. But with image i have a white square. I can't clik on. The relative past say sunset-compressor. The image is in the folder media. When i try to export in pdf... I have the same white square.

Thanks for your help ...

bepolymathe commented 7 years ago

Hello,

Can you make a screenshot of what you get after exporting? Is it only for export pdf or for html too?

What is the format of the image you insert?

I just tried it at home, no problem.

pbek commented 7 years ago

Are you sure those images are in the media folder (in your notes folder)?

bernalau commented 7 years ago

Following, the screenshot in qownnotes image

Following the pdf image

neither export in html. I try. Following the html image

Following, the medias folder : image

The format is the web format : jpeg

Thanks for your help.

pbek commented 7 years ago

Please post the output from the debug section in the settings dialog. What happens if you rename the images to .jpg and do the same in your notes?

bepolymathe commented 7 years ago

Est-ce que la note en question est dans ton dossier NotesLaurent ?

Dans l'idée, la structure est "dossier principal" de notes, dans lequel il y a "media" dans lequel il y a les images que tu insères dans différentes notes.

Et effectivement, je viens d'essayer avec jpg et png en insérant avec un glisser/déposer ou via le menu et ça marche. Avec un .jpeg ça ne marche pas et c'est reconnu comme une pièce jointe et non comme un media.

--- For @pbek

Is the note in your NotesLaurent folder?

in principle, the structure is "main folder" of notes, in which there is "media" in which there are the images that you insert in different notes.

And actually, I just try with jpg and png inserting with a drag / drop or via the menu and it works. With a .jpeg it does not work and it is recognized as an attachment ... and not as a media.

pbek commented 7 years ago

Why doesn't Windows recognize the extension jpeg!?

bepolymathe commented 7 years ago

Maybe a problem of encoding more than format ? @bernalau can you send a picture for test ?

bepolymathe commented 7 years ago

Other solution install linux ;-) (ok je sors)

bernalau commented 7 years ago

to answer question : What happens if you rename the images to .jpg and do the same in your notes? I have the two files extension in my folder media... And the two don't appears...

bernalau commented 7 years ago

I have test rename file : if i change extension and the link in qownnotes : same issue. I have copy on another path the file, change the extension in jpg. When i insert the file with menu "insert image", the file is copied in media with extension jpeg... and i have the same issue...

When i copy the image from same page html, and paste with option paste html or media, i have the same issue : qownnotes download file in media with jpeg extension...

bernalau commented 7 years ago

I have make another test : 1 - insert 2 files jpg

2 - copy from the html page.

Follow : the log file QOwnNotes.txt

bernalau commented 7 years ago

one file for test as asked : 4133 11642

bernalau commented 7 years ago

in the log i see that qownnotes download jpg format extension. But in media all files become jpeg extension...

bepolymathe commented 7 years ago

If i save your file on my computer and add it in Qownnotes :

Please, try to add ! before [name](path). This should resolve the issue temporarily file by file. Could you confirm ?

bepolymathe commented 7 years ago

I think it's "just" because .jpeg are considered like attachment and .jpg like media.

bernalau commented 7 years ago

i have the ! on qownnotes note :

image

pbek commented 7 years ago

Because of #627 I let Qt decide via the mimetypes of the file which extension best to use. Windows had major troubles if the extension was not what it needed, because it seems that Windows can't handle mimetypes at all... if you rename a jpg to doc Windows may think that it's a Word document... It seems Windows also has troubles with jpeg files... :(

bernalau commented 7 years ago

OK thanks for your explanation !!! But when i insert image jpg in qownnotes, the jpg extension is convert to jpeg each time...

pbek commented 7 years ago

Yes, I will create a workaround for that for Windows...

bernalau commented 7 years ago

thanks for your help !!!!!

bernalau commented 7 years ago

I found the problem !!! It's my fault !!! I have the bad a very bad habit : all my portable applications are in a folder name "#Admin" or "#Apps". For data folder, i have not name the folders with "#" at the beginning... I have test to move qownnotes application folder in folder "c:\Apps" and all work fine. I have the image in the notes...

Sorry for the times you spent on my issue, and my stupidity !!!!

And thanks a lot for your time, your help, and your kindness !!!

Best regards !!!

pbek commented 7 years ago

So does .jpeg files work under Windows?

bernalau commented 7 years ago

yes work perfect. The issue comme from the path notes. In the path, we have the path of Qownnotes\Data and the path of notes. With my bad habit, i had a # in the path of data !!!!

Thanks for your help !!!

bernalau commented 7 years ago

I close the issue.