rojer / a-s-minus

Awesome Screenshot Minus
102 stars 24 forks source link

Imgur Upload #31

Open carlbennett opened 7 years ago

carlbennett commented 7 years ago

I'd like to request a feature for being able to upload to Imgur from the extension.

rojer commented 7 years ago

yes, makes sense

jkayani commented 7 years ago

Should the image be uploaded anonymously to Imgur, or should it be tied to an Imgur account?

carlbennett commented 7 years ago

I think as a phase 1 it could be anonymous only and phase 2 you could implement the Imgur API and allow logging in.

jkayani commented 7 years ago

I probably missed something, but here are links to phase 1 and phase 2 Imgur integration:

Phase 1: https://github.com/jkayani/a-s-minus/tree/imgur-phase1 Phase 2: https://github.com/jkayani/a-s-minus/tree/imgur-phase2

Test them out, and if they seem pretty bug-free, I'll open a pull request.

carlbennett commented 7 years ago

I was just talking about phases cause it seemed like it was going to be a lot of work.

jkayani commented 7 years ago

I thought it was a good idea since I didn't really plan on doing it all anyway; plus I guess it's better practice that they're on separate branches. Anyway, let me know if you find a flaw in there.

carlbennett commented 7 years ago

I got an error with the phase1 branch with HEAD abf0773807476c7d997d1727c5ab77df7d9f5d62:

Permission 'identity.email' is unknown or URL pattern is malformed.

image

I also got an error while trying to use the upload:

Sorry, but a 404 error was encountered.
carlbennett commented 7 years ago

The phase2 branch at HEAD ff9d38676fe7b91b5955ff1f9389da2b18016a88 works successfully but I got the same permission error about identity.email.

carlbennett commented 7 years ago

And personally, I feel like both branches should be merged together to create a single "Imgur Upload" feature branch, but I'm not a maintainer so do as you wish.

jkayani commented 7 years ago

I was able to reproduce both issues in Opera on my laptop - the issue with the identity.email doesn't seem to affect the behavior of the extension, since it works fine on my laptop with the phase2 branch. It's probably just that Opera doesn't recognize that permission, whereas Chrome does.

The problem you found with the phase1 branch was a mistake I left behind in the code when I was working on it last; I'll make a commit to fix it soon. You'll get the same error with identity.email, but it should work fine.

The phase2 branch contains the functionality of the phase1 branch, so if any branch is going to merged into the project, it should be imgur-phase2. I only created them in phases because I wasn't sure how much of the implementation I'd be able to do.

carlbennett commented 7 years ago

I look forward to the next round of testing.

carlbennett commented 7 years ago

@rojer @jkayani Any update on this?

rojer commented 7 years ago

sorry, extremely busy with other stuff... but there might be some development here in a couple weeks.

ZeevoX commented 7 years ago

dev just merged @jkayani 's pull request: 4b76c46aec74f60829942f713053c05e377d2aed

carlbennett commented 7 years ago

@rojer still hasn't released it yet though.

marsjaninzmarsa commented 6 years ago

I cannot login to Imgur using OAuth, only login/password working...

https://youtu.be/4CBYlYIKqss

jkayani commented 5 years ago

I can reproduce your issue @marsjaninzmarsa, but I'm not sure what causes it nor how to fix it. The login prompt appears when we use the extension API browser.identity.launchWebAuthFlow, but after that, it's in the hands of the OAuth provider and the browser. Sorry.

I think this issue can be closed too.