ShareX / ShareX

ShareX is a free and open source program that lets you capture or record any area of your screen and share it with a single press of a key. It also allows uploading images, text or other types of files to many supported destinations you can choose from.
https://getsharex.com
GNU General Public License v3.0
28.36k stars 3.11k forks source link

Picasa API is deprecated #3884

Closed Zaczero closed 5 years ago

Zaczero commented 5 years ago

The error occurs while trying to upload a photo to Google Photos.

Message:

The remote server returned an error: (400) Bad Request.

Request URL:

https://picasaweb.google.com/data/feed/api/user/default/albumid/xxx

Response:

The Picasa API is deprecated. See https://developers.google.com/picasa-web/ for more details and the migration guide.

Stack trace:

at System.Net.HttpWebRequest.GetResponse() at ShareX.UploadersLib.Uploader.GetResponse(HttpMethod method, String url, Stream data, String contentType, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, Boolean allowNon2xxResponses)

Abu3safeer commented 5 years ago

@matthewburnett It works, the image is uploaded, as you said, it is album, not direct link. Thank you, I wish we find a workground to get the direct link instead.

lucario commented 5 years ago

The direct link is called the base url in the api, and that link is temporary and will stop working. The only way to have a permanent public url is to make an album and share it. You can try this yourself in the UI, navigate to an image, get public url, then keep going to the new public image and get url, google photos just makes new albums each time. There is no concept of public images, only shared albums.

On Jan 22, 2019, at 9:51 AM, Abu3safeer notifications@github.com<mailto:notifications@github.com> wrote:

@matthewburnetthttps://github.com/matthewburnett It works, the image is uploaded, as you said, it is album, not direct link. Thank you, I wish we find a workground to get the direct link instead.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/ShareX/ShareX/issues/3884#issuecomment-456426974, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKMl5UXVYFIFknyBGLULBtLOlF7SukWiks5vFyVogaJpZM4aD94l.

Abu3safeer commented 5 years ago

@matthewburnett does that mean if I right click and the image and copy it is link, that link will be temporary?

Sirosky commented 5 years ago

I switched over to mixtape.moe as my public ShareX uploader. I'll probably just use Google Photos or Drive to archive screenshots.

lucario commented 5 years ago

I personally wouldn’t recommend using someone else’s (free) uploader. We recommend using a cloud based solution you own, such as Google Cloud Storage or Amazon S3, it’s what we (devs, mods) personally use. We have guides and a discord for help and support configuring it https://getsharex.com/docs/google-cloud-storage

lucario commented 5 years ago

@Abu3safeer Correct, direct image links are all temporary.

Abu3safeer commented 5 years ago

@matthewburnett Thank you very much, I like Google could storage idea, but unfortunately it requires a credit card, fortunately Google play support paying with mobile credit, but it only allow mobile credit via Google play, so for now I just need to find another way to host images.

Tinypic is awesome if images are less than 1000X1000, if above that, the image will be resized to small resolution.

darkufo commented 5 years ago

@Abu3safeer Have you tried creating a folder in your Google Drive and using that method. Works very well for me. :)

Abu3safeer commented 5 years ago

@darkufo but it does not offer hotlink, I need something direct to use in websites like forums.

ghost commented 5 years ago

Contrary to everyone else, I have no problem uploading to GPhotos. I don't do albums, I just upload them. I know you can't get a direct entry, but who cares. But still Thanks ShareX team for fixing the problem! mic drop

darkufo commented 5 years ago

@Abu3safeer No worries.

@panthersdude2001 you're aware that those links will only work for you.

ghost commented 5 years ago

@Abu3safeer No worries.

@panthersdude2001 you're aware that those links will only work for you.

Oh Okay.

Abu3safeer commented 5 years ago

@panthersdude2001 you know, forums does only support direct links, beside they didn't even allow uploading to them, or they allow but with limited usage like limited image resolution, or limited file size, that is why I am looking for something direct.

I know there are thouthands of image hosting services, but most of them never last for long, only for short period.

This is why my journey to find the best image host will never come to an end!

ghost commented 5 years ago

System.ArgumentNullException: Value cannot be null. Parameter name: value at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at ShareX.UploadersLib.ImageUploaders.GooglePhotos.Upload(Stream stream, String fileName) at ShareX.WorkerTask.UploadData(IGenericUploaderService service, Stream stream, String fileName) at ShareX.WorkerTask.DoUpload(Int32 retry)

Message: The remote server returned an error: (500) Internal Server Error.

Request URL: https://photoslibrary.googleapis.com/v1/mediaItems:batchCreate

Response: { "error": { "code": 500, "message": "Internal error encountered.", "status": "INTERNAL" } }

Stack trace: at System.Net.HttpWebRequest.GetResponse() at ShareX.UploadersLib.Uploader.GetResponse(HttpMethod method, String url, Stream data, String contentType, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, Boolean allowNon2xxResponses)

System.ArgumentNullException: Value cannot be null. Parameter name: value at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at ShareX.UploadersLib.ImageUploaders.GooglePhotos.Upload(Stream stream, String fileName) at ShareX.WorkerTask.UploadData(IGenericUploaderService service, Stream stream, String fileName) at ShareX.WorkerTask.DoUpload(Int32 retry)

Message: The remote server returned an error: (500) Internal Server Error.

Request URL: https://photoslibrary.googleapis.com/v1/mediaItems:batchCreate

Response: Now getting a 500 Error! Please fix!

lucario commented 5 years ago

@panthersdude2001 Try downloading an updated dev build, I made some changes that might fix it.

ghost commented 5 years ago

Fixed. Thanks Matthew

liona005 commented 5 years ago

I can grow a link after installing the beta, but the link can't be shared and an account is required to open it. . .

lucario commented 5 years ago

Download the latest dev build, in google photos settings, make sure “Public upload” is checked.

JoaoMXN commented 5 years ago

What about using Blogger (from Google) to upload photos? They still have direct link,

lucario commented 5 years ago

I skimmed the API docs and couldn’t find a way to upload media.

JoaoMXN commented 5 years ago

I skimmed the API docs and couldn’t find a way to upload media. On Feb 14, 2019, at 8:18 PM, JoaoMXN notifications@github.com<mailto:notifications@github.com> wrote: What about using Blogger (from Google) to upload photos? They still have direct link, — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#3884 (comment)>, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKMl5bBofzrNCoC_tHxNaFo2-Cxugx4Hks5vNgrJgaJpZM4aD94l.

:/

I'm using the blogger upload function to use images at open live writer, that is suffering with the same problem of deprecated API.

Zaczero commented 5 years ago

@JoaoMXN the fix is currently only available in the dev build (not the stable one). You can either use another uploader on install the dev build inside the ShareX app. I don't remember where it is exactly (not on my PC right now) but check the about/settings for that button.

ghost commented 4 years ago

Somebody please reopen this thread? Time zones seem to be out of whack recently with the move to GPhotos.

lucario commented 4 years ago

@panthersdude2001 Make a new issue describing the problem