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

Link to ownCloud files #221

Closed
LukasDJacobs opened this Issue Jun 20, 2016 · 10 comments

Comments

Projects
None yet
2 participants
@LukasDJacobs

LukasDJacobs commented Jun 20, 2016

I very often link to other files in my ownCloud (usally a PDF). As I am using multiple devices and OS's (Win7/Linux dualboot PC at home, Win10 at work, Linux notebook, Android phone), the files are located in very different paths. The resulting workflow isn't really pleasing, as I have to share every single file I want to link to in ownCloud via URL and copy the URL over to QOwnNotes.
My suggestion is, that this process could be automated a bit, much like when I just want to link to another note.

I am obviously using Markdown for my notes.

@pbek pbek added the enhancement label Jun 21, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Jun 21, 2016

Are you talking about sharing a file in ownCloud (creating a public link) and placing it into a note?
Do you know if there is a public API by ownCloud to do this?

The other solution still is to drop the file into QOwnNotes directly, but the links created there will not be reachable by the Android client if the developers don't implement that feature...

@LukasDJacobs

This comment has been minimized.

LukasDJacobs commented Jun 21, 2016

Are you talking about sharing a file in ownCloud (creating a public link) and placing it into a note?

Yes. Selecting files in my ownCloud directory works, but the links created aren't even reachable by machines with a different folder structure. For example the following link won't be reachable from my notebook, because the path to the ownCloud directory is different.
For more information have a look at the [manual](file:///C:/Users/Lukas/owncloud/ownCloudUserManual.pdf).
To deal with this I am generating public links by hand and insert those here.
I just had a quick look into the ownCloud developer manual and found, that there actually is an API to create new shares.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 22, 2016

I will take a look at the API, thanks for looking.

You should be able to link to files relatively to your note folder, like it is done for images: ![nature-h-c-768-1024-1](file://media/29931179.jpg)
The images are placed in the media folder in your note folder. Does that work for you?

@LukasDJacobs

This comment has been minimized.

LukasDJacobs commented Jun 22, 2016

I just tried on my Win7 machine.

[manual](file://../ownCloudUserManual.pdf)
[manual](../ownCloudUserManual.pdf)

Both lines didn't work. This would certainly be a good workaround!

@pbek

This comment has been minimized.

Owner

pbek commented Jun 22, 2016

The first one already works in the preview, does it also work for you?
I would have to create a handler to make it clickable in the editor as well...

@pbek

This comment has been minimized.

Owner

pbek commented Jun 22, 2016

I'm already working on it, but it's not easy, since the first link isn't a valid URL either... I have to change a lot of stuff...

@LukasDJacobs

This comment has been minimized.

LukasDJacobs commented Jun 23, 2016

The first one already works in the preview, does it also work for you?

No, it does not work for me.

@pbek

This comment has been minimized.

Owner

pbek commented Jun 23, 2016

That's strange. For me [manual](file://../ownCloudUserManual.pdf) works in the markdown preview (not in the textedit) under Windows 8.1.

@pbek pbek added this to the 16.06.11 milestone Jun 23, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Jun 23, 2016

I had to rewrite quite some things to make everything work again, I hope nothing is missing...
I've successfully tested these links und Linux, OS X and Windows 8.1:

- [manual](file://../ownCloudUserManual.pdf)
- <file://../ownCloudUserManual.pdf>
- <note://QOwnNotes_Todo>
- [Alarmtest2](task://6aa6d1da-5975-439b-9fe9-29c0d0b70546)
- ![nature-h-c-768-1024-7](file://media/1352895271.jpg)

from the changelog for v16.06.11:

  • relative file urls like [manual](file://../ownCloudUserManual.pdf) and
    <file://../ownCloudUserManual.pdf> now work in the note text edit and the
    note preview
@pbek

This comment has been minimized.

Owner

pbek commented Jun 23, 2016

There now is a new release, could you please test it and report if the new features work for you?

@pbek pbek closed this Jun 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment