Skip to content

Make Nextcloud a great image hosting/upload service #2523

Closed

Description

@eppfel

@jospoortvliet mentioned in #1472 it would be nice to serve images directly from Nextcloud to embed them in forums/github/etc.

Besides the image preview generated by Nextlcoud, there is the, not so obvious, direct /download shortcut you can add to share links:

So this:

![Test picture of Khao Sok National Park, Thailand](https://epp.cloud/s/HBXk2Hy9BkW0GTc/download)

Creates this:

![Test picture of Khao Sok National Park, Thailand](https://cloud.githubusercontent.com/assets/1899308/20925855/9d086ff6-bbb9-11e6-9995-fcc0ad570c28.jpg)

But the file is just downloaded by github, instead of directly served by my cloud. Embedding in HTML does not work this way.
Edit: The file is downloaded each time, but served from a github domain https://camo.githubusercontent.com/521c7650d7f562c307edee29b2366e98ce7249bf/68747470733a2f2f6570702e636c6f75642f732f4842586b32487939426b57304754632f646f776e6c6f6164. Problem now is, that my activity feed is flooded. Removed the direct link.

Maybe we could create something like:

https://epp.cloud/s/HBXk2Hy9BkW0GTc/preview

or even with image resize:

https://epp.cloud/s/HBXk2Hy9BkW0GTc/720p

From users POV this would need to be possible without fiddling with the url itself. @nextcloud/designers

@nextcloud/sharing Thoughts?

Activity

  1. rullzer commented on Dec 6, 2016

    @rullzer
    Member

    Creating such an URL should be doable. But I have no idea how to do the US there.

  2. MorrisJobke commented on Dec 6, 2016

    @MorrisJobke
    Member

    This is done by intention. Serving the content as inline content would allow XSS attacks. To properly do this we should serve raw content from a different domain. (Like the githubusercontent domain here on Github)

    Cc @LukasReschke

  3. LukasReschke commented on Dec 6, 2016

    @LukasReschke
    Member

    Correct. We need a separate domain or only allow this for images that we have re-encoded. (e.g. passed through our preview class)

  4. LukasReschke commented on Dec 6, 2016

    @LukasReschke
    Member

    So a preview endpoint sounds sane to me - but what is the expected behaviour if we can't generate one? Error message? File icon?

  5. rullzer commented on Dec 6, 2016

    @rullzer
    Member

    just a 404?

  6. jm-andonegi commented on Dec 6, 2016

    @jm-andonegi

    Hi:
    Could it be possible to apply something similar to HTML files so that we could serve static websites?

  7. LukasReschke commented on Dec 6, 2016

    @LukasReschke
    Member

    Could it be possible to apply something similar to HTML files so that we could serve static websites?

    That is not possible for security reasons without having a usercontent domain as @MorrisJobke in #2523 (comment) pointed out. Even then, I highly doubt that we're going to do that for phishing protection etc…

  8. added
    1. to developAccepted and waiting to be taken care of
    and removed
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Dec 6, 2016
  9. jm-andonegi commented on Dec 6, 2016

    @jm-andonegi

    And could it be possible to replicate the content in a public folder of the server and offer the user the public link?

  10. 28 remaining items

  11. Happyfeet01 commented on Sep 17, 2017

    @Happyfeet01

    What is the roadmap about this feature? Would be nice if this worked. Easier sharing Gallery to my Wordpress Blog.

  12. jospoortvliet commented on Sep 18, 2017

    @jospoortvliet
    Member

    @Happyfeet01 from what I can tell this isn't a customer requirement so it depends on somebody willing to put in his/her free time. And until somebody steps up to do that, the ETA is essentially infinite :(

    I had hoped we'd have some time at the conf and maybe somebody did but I didn't discuss it with anyone...

  13. jancborchardt commented on Sep 21, 2017

    @jancborchardt
    Member

    Pull request at #6599, everyone please review. :)

  14. Nottt commented on May 2, 2018

    @Nottt

    Any news on this?

    I want to serve a .json file directly with a url that ends like this https://nextcloud.com/file.json. Is it possible ?

    Example: http://softwarebakery.com/apps/drivedroid/repositories/main.json

  15. SlavikCA commented on May 2, 2018

    @SlavikCA

    @Nottt This is closed issue. What kind of news do you expect?

    By the way, hosting files on the same domains, as NextCloud may be security issue.

    You can always have related domain / subdomain, and configure Apache / Nginx / ... to point to one of your data (sub)folder in NextCloud and enable Indexes for that location.

  16. 4nd3r commented on May 2, 2018

    @4nd3r

    You can always have related domain / subdomain, and configure Apache / Nginx / ... to point to one of your data (sub)folder in NextCloud and enable Indexes for that location.

    not really, since nextcloud (by default) modifies access bits of data folder (to 770):

    chmod($dataDirectory, 0770);

    unless you are running httpd as same user as your php process, which is usually bad idea.

    tho, looks like you can turn it off using check_data_directory_permissions config option.

    YMMV, of course. and sorry for spamming in closed issue.

  17. jcklpe commented on Dec 9, 2018

    @jcklpe

    Has the work on this feature been dropped? It seems to me like it would be super valuable. I've been using github gists to sync some custom css styling for Vscode but every time I change I have to change the url and stuff in my settings.json. I used to have it pointed to the local version of the file but that became a problem when switching between linux windows environments that didn't necessarily have the same local path.

  18. kesselb commented on Dec 9, 2018

    @kesselb
    Contributor

    Has the work on this feature been dropped?

    No. This feature request was about "Make Nextcloud a great image hosting/upload service" and has been resolved with #6599.

    When you think that the image hosting feature should be extended to show insert your filetype here as well you may open a new feature request for it.

  19. jcklpe commented on Dec 10, 2018

    @jcklpe

    Okay cool thanks. I see how the preview thing works now. Doesn't work with raw text files so I'll put up a request. Thanks!

  20. gbraad commented on Jan 9, 2023

    @gbraad

    Not sure where this preview option is available, a currently sharing a file leads to a page but services and apps like WhatsApp can't load a preview this way

  21. soyelmismo commented on Feb 5, 2023

    @soyelmismo

    Not sure where this preview option is available

    yeh, we need a link ending with the image extension, i can't use the preview link in some websites as embed

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions