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
{{ message }}
Repository navigation
Make Nextcloud a great image hosting/upload service #2523
@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:

Creates this:

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
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)
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…
@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...
@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.
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):
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.
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
Activity
rullzer commentedon Dec 6, 2016
Creating such an URL should be doable. But I have no idea how to do the US there.
MorrisJobke commentedon Dec 6, 2016
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
LukasReschke commentedon Dec 6, 2016
Correct. We need a separate domain or only allow this for images that we have re-encoded. (e.g. passed through our preview class)
LukasReschke commentedon Dec 6, 2016
So a preview endpoint sounds sane to me - but what is the expected behaviour if we can't generate one? Error message? File icon?
rullzer commentedon Dec 6, 2016
just a 404?
jm-andonegi commentedon Dec 6, 2016
Hi:
Could it be possible to apply something similar to HTML files so that we could serve static websites?
LukasReschke commentedon Dec 6, 2016
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…
jm-andonegi commentedon Dec 6, 2016
And could it be possible to replicate the content in a public folder of the server and offer the user the public link?
28 remaining items
Happyfeet01 commentedon Sep 17, 2017
What is the roadmap about this feature? Would be nice if this worked. Easier sharing Gallery to my Wordpress Blog.
jospoortvliet commentedon Sep 18, 2017
@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...
jancborchardt commentedon Sep 21, 2017
Pull request at #6599, everyone please review. :)
Nottt commentedon May 2, 2018
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
SlavikCA commentedon May 2, 2018
@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.
4nd3r commentedon May 2, 2018
not really, since nextcloud (by default) modifies access bits of data folder (to 770):
server/lib/private/legacy/util.php
Line 1001 in e9c6ec4
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_permissionsconfig option.YMMV, of course. and sorry for spamming in closed issue.
jcklpe commentedon Dec 9, 2018
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.
kesselb commentedon Dec 9, 2018
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.
jcklpe commentedon Dec 10, 2018
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!
gbraad commentedon Jan 9, 2023
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
soyelmismo commentedon Feb 5, 2023
yeh, we need a link ending with the image extension, i can't use the preview link in some websites as embed