Skip to content

Embed public files on a Website #1472

Closed

Description

@skerbis

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.

Activity

  1. eppfel commented on Sep 20, 2016

    @eppfel
    Member

    Is there a way to embed a public folder by iframe or php into a Website

    This imposes a security risk, if not from same origin and is not advised. 😁
    @nextcloud/security Right? Do you know something? -->

    Or do you know a nice Webdav browsing class for PHP?

  2. changed the title [-]Embed public files on a Webite[/-] [+]Embed public files on a Website[/+] on Sep 20, 2016
  3. jospoortvliet commented on Dec 5, 2016

    @jospoortvliet
    Member

    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...

  4. eppfel commented on Dec 6, 2016

    @eppfel
    Member

    @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?

  5. MorrisJobke commented on Dec 6, 2016

    @MorrisJobke
    Member

    See also #2523 (comment) for the security aspects ;)

  6. skerbis commented on Dec 6, 2016

    @skerbis
    Author

    @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?

  7. skerbis commented on Sep 23, 2017

    @skerbis
    Author

    or short is there a api for that?

  8. jospoortvliet commented on Sep 25, 2017

    @jospoortvliet
    Member

    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

  9. Xemanth commented on Feb 5, 2018

    @Xemanth

    Any progress on this matter? It would be excellent feature to view Nextcloud public link "folder" straight from Wordpress.

  10. skerbis commented on Feb 5, 2018

    @skerbis
    Author

    @Xemanth or any other "real" CMS ;-)

  11. mveplus commented on Mar 7, 2018

    @mveplus

    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,

  12. jospoortvliet commented on Mar 7, 2018

    @jospoortvliet
    Member

    @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/

  13. SlavikCA commented on Mar 7, 2018

    @SlavikCA

    @mveplus
    There are few ways to do it. Here is how I do it:

  14. mveplus commented on Mar 7, 2018

    @mveplus

    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

  15. doogalbear commented on Mar 23, 2018

    @doogalbear

    @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.

  16. skerbis commented on Mar 23, 2018

    @skerbis
    Author
  17. srednax commented on Nov 13, 2019

    @srednax

    Works for me:
    https://www.ortlepp.eu/blog/2016/access_nextcloud_with_php_and_curl.html

    The link is not working. It would be nice with a description on how to do this :)

  18. kesselb commented on Nov 13, 2019

    @kesselb
    Contributor
  19. skerbis commented on Nov 13, 2019

    @skerbis
    Author

    Here's a PHP-Solution: https://github.com/fercavi/webdav

  20. srednax commented on Nov 13, 2019

    @srednax

    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.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions