E
E
eazygem2018-04-27 17:41:21
PHP
eazygem, 2018-04-27 17:41:21

How to create a link to an image in OwnCloud?

I recently downloaded and installed the OwnCloud 6 cloud hosting in order to upload pictures to it and then use them on another site. However, when I make an image public and copy a link to it, it doesn't open the image itself, but the page with it. Below is a direct download link like .../owncloud/public.php?service=files&t=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx&download, but when you go to it, the file is immediately downloaded, while I need the image to open in the browser (as happens with the logo google ).
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
eazygem, 2018-04-27
@eazygem

Luckily, I was able to find the answer myself. If you examine the image element on the image page, you can see a link like this:
.../owncloud/index.php/apps/files_sharing/ajax/publicpreview.php?x= 123 &y= 123 &a=true&file=undefinedmiramarmap.jpg&t=0c0d876ff5edcc9dab0af86efdf50170&scalingup =0
So, this is the link where you can open the image in the browser. The main thing is to correctly set the get parameters x and y (they can be changed depending on what resolution you need). The scalingup parameter can be completely removed

R
Roman Grinberg, 2018-04-27
@GarfieldOfficial

Try removing &download from the link and following it.
UPD: If you just want to insert pictures that you don’t need to go to, then you can use the link with &download , it will work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question