GNOME Bugzilla – Bug 407128
Automatic uploading to Image Hoster
Last modified: 2020-11-26 15:42:47 UTC
It would be great to have an option to automatically submit the shot to a quick image hoster and give to user the URL to quickly share the image with others. I'm not sure whether the popular hosters like ImageShack would allow this, but perhaps it is possible to create an own service.
*** Bug 539567 has been marked as a duplicate of this bug. ***
Quoting bug 539567: --- for example, using postr to send to flickr, using f-spot to send to all others and using ScrnShots API ( http://groups.google.com/group/scrnshots-developer-talk/web/api-documentation ) to send to them. ---
thanks Vincent :) .
*** Bug 636974 has been marked as a duplicate of this bug. ***
Is this being developed?
I wrote a patch that adds an Upload/Pause button + progress bar to upload to imgur.com (they seem to be FOSS-friendly, and provide a simple API). Eventually we should use libsocialweb or something. I started working on gnome-utils.git/gnome-screenshot because gnome-screenshot.git seems to need gnome-shell-3.3.x to work (or am I missing something?) Below I'll be attaching a patch against gnome-screenshot.git which is actually a blind port from gnome-utils.git/gnome-screenshot with only a compile test since I can't get gnome-screenshot.git to work with GNOME 3.2 TODO: * Does not handle HTTP errors (actually, most errors) properly. * After uploading, the image URL and the image delete URL are opened in the browser. They should probably be just displayed in the window. Need to figure out the exact UI for this. * The code is a bit of a mess. Too many static variables. * Translation stuff is probably missing/wrong. Not sure. For the convenience of people in the CC list, a patch against gnome-utils-3.2.1 can be found here: http://git.overlays.gentoo.org/gitweb/?p=dev/nirbheek.git;a=blob_plain;f=gnome-extra/gnome-utils/files/gnome-utils-3.2.1-upload-screenshots.patch;hb=HEAD
Created attachment 208006 [details] [review] Patch to upload screenshots to imgur.com I realize this code is probably fundamentally wrong since it uploads only to imgur, and most likely can't be merged. Nevertheless, code reviews would be greatly appreciated.
Created attachment 208041 [details] [review] Restrict the preview area size using the screen size rather than the screenshot size This avoids horizontal resizing and widget jumping when the "Upload" button is pressed. The patch is completely independent of the other patches.
Created attachment 208050 [details] [review] Patch to upload screenshots to imgur.com This updated patch displays the image and delete links in the screenshot dialog itself (with GtkLinkButton), instead of unexpectedly opening them in the browser. Here's a video (~2MB) demonstrating how it looks/works: http://dev.gentoo.org/~nirbheek/files/gnome3/video/gnome-screenshot-demo.webm (I haven't attached it to the bug because I'm on mobile broadband right now)
Its amazing! In my opinion imgur is a great service, but perhaps - as you said - it would be a good idea to be able to upload to other services with the mentioned API before the patch is applied to the main repository. Great work! If only there was someone like you for every bug report
Created attachment 208552 [details] [review] Patch to upload screenshots to imgur.com This updated patch removes one static variable, and replaces it with a struct member. It also fixes two gchar* memory leaks, and adds better debugging for HTTP failures. (In reply to comment #10) > Its amazing! In my opinion imgur is a great service, but perhaps - as you said > - it would be a good idea to be able to upload to other services with the > mentioned API before the patch is applied to the main repository. > When I talked to hadess (Bastien Nocera) on #gnome-design, he said that nautilus-sendto integration would be a better fit, and I agreed with him. If this is the planned direction for GNOME 3, then I'll work on that instead. Also, I suppose someone will need to add photo uploading support to nautilus-sendto. :-)
As a temporary solution, or if you need some ideas on this, here a is a script that uses scrot, curl, xclip and libnotify to select an area of the screen and uploads it to imgur (displaying a notification and copying the URL to the clipboard). https://rxtx-linux.googlecode.com/svn/trunk/misc-scripts/web/screenshot-to-imgur.sh All credits go to the original author.
The good thing about having this directly integrated with gnome-screenshot is that you would skip saving the image and using nautilus-sendto. Another workaround is to use Glippy, a clipboard manager which lets you upload any "copied" image to imgur or imageshack.
(In reply to comment #13) > The good thing about having this directly integrated with gnome-screenshot is > that you would skip saving the image and using nautilus-sendto. > The nautilus-sendto integration would be inside gnome-screenshot, so the workflow would be similar. It would just support more services and destinations.
Thats even better then! I had no idea
*** Bug 340515 has been marked as a duplicate of this bug. ***
*** Bug 705061 has been marked as a duplicate of this bug. ***
It would make a lot of sense to connect this to the GNOME Online Accounts. You could simply choose if you want to add this (or share it via) your Google Drive, or your ownCloud, or or or. If there’s anything you need from ownCloud so we can integrate that, let us know. We use plain WebDAV (as is registered in GNOME Online Accounts) and we have a Share API: http://doc.owncloud.org/server/7.0/developer_manual/core/ocs-share-api.html
(In reply to comment #18) > It would make a lot of sense to connect this to the GNOME Online Accounts. You > could simply choose if you want to add this (or share it via) your Google > Drive, or your ownCloud, or or or. > Since the changes to how screenshots are handled in the shell (no UI, automatically saved in ~/Pictures, etc), it's not really clear how this feature could be added. The design team would have to come up with something first, I think. I couldn't find anything on the wiki, but if someone can point me to a design, I'll be able to work on this again!
Having the Shell screenshot action upload to some place is probably never going to work; there are extensions for it, though, like: https://extensions.gnome.org/extension/1112/screenshot-tool/ Cloud providers are already integrated in the GTK file selection dialog: - NextCloud/OwnCloud - Google Drive Which leaves only image hosting providers, like imgur or paste.xinu.at. I've opened a new issue on GitLab: https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/136 We can close this one as obsolete, though, given that the patches do not apply any more.