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

Question: Code for image display #530

Closed
1 task done
uli-on opened this issue Apr 23, 2019 · 5 comments
Closed
1 task done

Question: Code for image display #530

uli-on opened this issue Apr 23, 2019 · 5 comments
Milestone

Comments

@uli-on
Copy link

uli-on commented Apr 23, 2019

  • I have searched for existing issues that may be the same as or related to mine.

What is the code necessary for

  • displaying an image from internal storage
  • displaying an image from external storage
  • creating a link to a document from external storage

Whatever I tried, no success. (Yes, the setting for displaying images is activated.)

Edit:
Orgzly 1.7.3
Android 6.0.1
Motorola G4

@nevenz
Copy link
Member

nevenz commented Apr 27, 2019

File links should be replaced with images if they are valid. See http://www.orgzly.com/help#a7a9f79.

What happens when you click on the link which should be an image? Any error message popping up?

@uli-on
Copy link
Author

uli-on commented Apr 27, 2019

Ok, I managed to have an image display from internal storage, didn't think I had to remove information that I can copy from any regular file manager.

But whatever I tried to create a link to a file on external storage failed: removing 3366-3661, adding one, two, or three slashes after the colon, putting img or image before the colon, adding ../ after the colon (disastrous was adding ../../ after the colon, crashed on any attempt to open that notebook again).

The messages were mostly "... does not exist" and once "Failed to find configured root that contains..."

You see that I'm not lazy, just desparate. I could well procede independently if you posted an example for displaying an image on external storage. Thanks!

@nevenz
Copy link
Member

nevenz commented Apr 28, 2019

Check out #427 and #496.

I've went through different links recently again, see examples in #496 (comment).

@uli-on
Copy link
Author

uli-on commented Apr 29, 2019

In #496 You wrote:

These all currently work (after 1a63a68):
...
file:/storage/0F18-3901/file-on-sd-card.txt

According to that file:/storage/3366-3661/DCIM/Camera/schoki.jpgshould work. But it doesn't. Never did. Though it's copied & pasted from a file manager. Hence my first post here above. Now what?

@nevenz
Copy link
Member

nevenz commented May 2, 2019

According to that file:/storage/3366-3661/DCIM/Camera/schoki.jpg should work. But it doesn't.

Clicking on that does not open the image?

It looks like absolute paths are not properly handled when trying to display the image inline. That will be fixed, thanks.

@nevenz nevenz added this to the v1.7.4 milestone May 2, 2019
@nevenz nevenz closed this as completed in 7756d59 May 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants