Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Retrieve a public gallery description via javascript #212

Open
oliverpool opened this issue Mar 3, 2017 · 1 comment
Open

Retrieve a public gallery description via javascript #212

oliverpool opened this issue Mar 3, 2017 · 1 comment

Comments

@oliverpool
Copy link

oliverpool commented Mar 3, 2017

Feature request

User type: Logged-in user (for use by public user)

User level: Advanced

Description

I would love to be able to integrate the galleries of nextcloud into my website the following way (in bold the missing part):

  1. Create a folder with some pictures (on nextcloud)
  2. Create a public link to share the folder content (on nextcloud)
  3. Get a javascript link to retrieve the picture list and URLs (on nextcloud)
  4. Be able to use this list to display a gallery (on my website)

I see two major parts:

  • Get the image list (either via JSON and appropriate CORS or JSONP - I prefer the first option)
  • Get the images (thumbnail and full size) via some URL

The "gallery" part is left to the user (I'm considering using http://nanogallery2.nanostudio.org/ for instance). Some boilerplate code could be given as example to have a working gallery in 2 mins.

Benefit / value

It would prevent redondant work (saving the pictures to my nextcloud and uploading them to my website).
It would save space (and bandwidth) on my website server and integrate nicely (nicer a simple link to the public gallery).
It would be very flexible (I can add/remove pictures later from the nextcloud folder and it will update my blog accordingly).

Risk / caveats

Exposing a JSONP file makes the calling website (blog) vulnerable if the nextcloud server is compromised.
Adding ways to access file list and images opens new possibility to get access to the nextcloud server (possibility of a security breach with CORS allowed).

Are you a developer willing to implement this feature?: yes (but I don't have enough knowledge of the internals of nextcloud yet)

Can you sponsor the development of this feature or do you know someone who can?: not yet

@oparoz
Copy link
Member

oparoz commented Mar 6, 2017

Have a look at:
https://github.com/nextcloud/gallery/wiki/RESTful-API

and maybe comment on
#95

if you feel something is still missing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants