You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to embed a public folder by iframe or php into a Website,
so that a user can browse a folder and download the files he or she needs.
Or do you know a nice Webdav browsing class for PHP?
We want to share some public data which will be perhaps managed in a nextcloud.
If forums have fixed width limits, extra preprocessing is needed for the image (by the user) or the URL has to further change the URL by hand, in particular the 'x=...' parameter has to be set to something like x=720 or smaller (the above example uses x=600)
@nextcloud/designers do you think it would make sense to try and simplify these links and make it easier to embed images from a Nextcloud instance in other places? I'd actually love to put a screenshot on my NC and directly paste the image here...
Reacted by Paulo Moura, Felix A. Epp, Slavik, fred and delavigne
@eppfel the best thing would be a PHP-Class which allwos me to show the Folders, Files and Subfolders inside the Website. The Folder is managed inside nextcloud but should be shown on the Website. Perhaps does anyone know a PHP-Script for integrating a webdav-browser?
Thanks, NC team & fans! Direct share link for an Image works great in v13!
It would be great if this can grow up to be done for a folder or a video for purpose of HTML image/video storage backend.
I'm running NC on VPS and I host a static HTML page on the same VPS behind Nginx on the same domain/cloud is NC served by Nginx.
I was looking into OCS APIs and user created just for accessing shared folders for accessing user shares and serving folder-images for this static HTML page or thinking of using just bare share URL generated from NC, but still can't figure it out what would be the best way to accomplish this if possible without adding any security flaws.
I don't want to go iframe so is there a way to use raw shared folder content?
Is there a way to access/list public shared folder using OCS API without user authentication?
I create Apache virtual server (vhost), which points to that folder. I'm sure you can do same thing in Nginx and I can access all my files via HTTP(s): https://slavikf.com/Shared/
Reacted by Winston Ford, Thomas Skerbis, Stephen Vanderwarker and Julien Maulny
Thanks, @jospoortvliet and @SlavikCA I have now a few more thoughts to chew up and tinker.
I've looked at picocms it looks interesting, for time being I think vhost option would serve me better, I'm going to try it ;)
Thanks for taking the time to replay! I'm sure if there is enough interest NC team will come up with a solution.
Cheers
@SlavikCA
I like your approach. I'm fairly new to vhost setups. Can you share an example of how this is setup. I am wanting to do this with Ghost and Nextcloud.
Activity
eppfel commentedon Sep 20, 2016
This imposes a security risk, if not from same origin and is not advised. 😁
@nextcloud/security Right? Do you know something? -->
[-]Embed public files on a Webite[/-][+]Embed public files on a Website[/+]jospoortvliet commentedon Dec 5, 2016
There's more than iframing this.
What about embedding an image on a public website, in a forum somewhere?
Say you're on a forum like here:
https://forum.kde.org/viewtopic.php?f=221&t=137440&p=367768#p367768
and you want to embed an image from a Nextcloud instance, you get a URL like:
https://share.kde.org/index.php/apps/files_sharing/ajax/publicpreview.php?x=600&y=558&a=true&file=sharing.png&t=tH1ZvenNd3JPFM8&scalingup=0
A few more points:
@nextcloud/designers do you think it would make sense to try and simplify these links and make it easier to embed images from a Nextcloud instance in other places? I'd actually love to put a screenshot on my NC and directly paste the image here...
eppfel commentedon Dec 6, 2016
@jospoortvliet I opened a dedicated issue, because the use case @skerbis mentioned, is a little bit different and I like your idea!
@skerbis Why does your "folder" have to be embedded into another site? Would theming and a direct link not be enough?
MorrisJobke commentedon Dec 6, 2016
See also #2523 (comment) for the security aspects ;)
skerbis commentedon Dec 6, 2016
@eppfel the best thing would be a PHP-Class which allwos me to show the Folders, Files and Subfolders inside the Website. The Folder is managed inside nextcloud but should be shown on the Website. Perhaps does anyone know a PHP-Script for integrating a webdav-browser?
skerbis commentedon Sep 23, 2017
or short is there a api for that?
jospoortvliet commentedon Sep 25, 2017
Well there's webDAV & the OCS API, but you'd have to write your own view. Perhaps CMS Pico can help?
https://github.com/nextcloud/cms_pico
Xemanth commentedon Feb 5, 2018
Any progress on this matter? It would be excellent feature to view Nextcloud public link "folder" straight from Wordpress.
skerbis commentedon Feb 5, 2018
@Xemanth or any other "real" CMS ;-)
mveplus commentedon Mar 7, 2018
Thanks, NC team & fans! Direct share link for an Image works great in v13!
It would be great if this can grow up to be done for a folder or a video for purpose of HTML image/video storage backend.
I'm running NC on VPS and I host a static HTML page on the same VPS behind Nginx on the same domain/cloud is NC served by Nginx.
I was looking into OCS APIs and user created just for accessing shared folders for accessing user shares and serving folder-images for this static HTML page or thinking of using just bare share URL generated from NC, but still can't figure it out what would be the best way to accomplish this if possible without adding any security flaws.
I don't want to go iframe so is there a way to use raw shared folder content?
Is there a way to access/list public shared folder using OCS API without user authentication?
Kind Regards,
jospoortvliet commentedon Mar 7, 2018
@mveplus it must be possible, though I don't know how... As I said, you can use cms_pico for some things, at least - https://nextcloud.com/blog/nextcloud-introduces-easy-website-builder-for-education-edition-with-picocms/
SlavikCA commentedon Mar 7, 2018
@mveplus
There are few ways to do it. Here is how I do it:
https://nc.slavikf.com/index.php/s/5Fcm69RiS2FtyRL
https://slavikf.com/Shared/
mveplus commentedon Mar 7, 2018
Thanks, @jospoortvliet and @SlavikCA I have now a few more thoughts to chew up and tinker.
I've looked at picocms it looks interesting, for time being I think vhost option would serve me better, I'm going to try it ;)
Thanks for taking the time to replay! I'm sure if there is enough interest NC team will come up with a solution.
Cheers
doogalbear commentedon Mar 23, 2018
@SlavikCA
I like your approach. I'm fairly new to vhost setups. Can you share an example of how this is setup. I am wanting to do this with Ghost and Nextcloud.
skerbis commentedon Mar 23, 2018
Works for me:
https://www.ortlepp.eu/blog/2016/access_nextcloud_with_php_and_curl.html
srednax commentedon Nov 13, 2019
The link is not working. It would be nice with a description on how to do this :)
skerbis commentedon Nov 13, 2019
@srednax it's documented here at the end: https://docs.nextcloud.com/server/13.0.0/user_manual/files/access_webdav.html#accessing-files-using-curl
kesselb commentedon Nov 13, 2019
https://docs.nextcloud.com/server/latest/user_manual/files/access_webdav.html#accessing-files-using-curl
(above link will always point to the latest documentation)
skerbis commentedon Nov 13, 2019
Here's a PHP-Solution: https://github.com/fercavi/webdav
srednax commentedon Nov 13, 2019
I installed an app that provides a link, called shared path. It is immature, but it does provide a functional URL if you share a link to a file.