GooglyBlox / ClipboardToFileInput

ClipboardToFileInput is a Chrome extension allowing users to paste clipboard content directly into web page file inputs on Google Chrome (a feature Opera has had for a while now).
Other
35 stars 3 forks source link

Not working for Images? #6

Closed ElCapitanode closed 8 months ago

ElCapitanode commented 8 months ago

https://rolladvantage.com/tokenstamp/ is the website in question i tried, when clicking paste it just pastes an empty nothingness. windows 10, Google Chrome

GooglyBlox commented 8 months ago

Can replicate, very interesting! Will take a look and attempt to push out a fix ASAP 👍

GooglyBlox commented 8 months ago

@ElCapitanode It should be fixed in the latest release!

ElCapitanode commented 8 months ago

It still doesnt work for me Chief. Its clearly doing something since whenever i reload the extension i have to reload tokenstamp else nothing works, but the paste popup still doesnt properly paste the image. I dont know what further information i could provide here, soz.

GooglyBlox commented 8 months ago

Huh, strange! Seems to be working fine for me under the same conditions...

Would you be able to open the developer console (Ctrl + I, and then hit console) and screenshot what it says there after attempting an upload? Additionally, could you go to chrome://extensions/ and see if there are any errors on the extension? I'm possibly missing some edge case that's preventing this from working.

GooglyBlox commented 8 months ago

Additionally! If there isn't anything fruitful in the logs, please try using this beta version of the future 2.5 update. Maybe while handling edge cases I've accidentally solved your problem?

ClipboardToFileInput.zip

ElCapitanode commented 8 months ago

The 2.5 beta couldnt be found, error 404, and the Ctrl Command didnt bring up anything. In the chrome extensions it will say "service worker(inactive) though, until i click it which brings up a devtools tab. image

GooglyBlox commented 8 months ago

Hm, the 2.5 beta downloads fine for me, so that's strange - but it should be ready for release. I'll push that out on the main releases and we'll see if that fixes it. The extension devtools seem to be working fine, no errors there and everything is returning true. The service worker (in manifest v3) goes inactive when not in use, so that's expected behavior since it wakes up when you trigger the extension.

Let's see if 2.5 works for you, otherwise I'll see what else I can do for debugging.

Edit: Here's the 2.5 release, hopefully we see an improvement.

ElCapitanode commented 8 months ago

Release download worked, updated, problem persists though. Tested on https://tinypng.com/ aswell and it broke the "Convert my Images automatically" Selection.

GooglyBlox commented 8 months ago

Hm, I am seeing that you can't click the "Convert my Images automatically" selection, but all other functionality seems to be working perfectly fine to me on tinypng. Would you by any chance be able to show a screenshot/video of what happens when you click the file upload input? I'm extremely curious to see what's wrong and solve it.

ElCapitanode commented 8 months ago

https://github.com/GooglyBlox/ClipboardToFileInput/assets/160644754/9f447a7f-0742-436c-8e6e-66c437b95107 (My recording Software hotkey is F1, thats why the help page opened)

GooglyBlox commented 8 months ago

Okay this is sort of silly, but it appears the image you're attempting to copy is being copied as an HTML file - this is probably because its a WEBP file! I tested it myself, and it would appear that is exactly what's causing it. Will whip up a fix and edit the 2.5 release shortly 😄

GooglyBlox commented 8 months ago

Alright, should be fixed! Redownload the lastest release and it should work fine, although I will need to make some optimization changes to fix it triggering the file input incessantly and unnecessarily on tinypng 😅

But otherwise, should work with WEBPs! Silly thing for me to miss, glad this issue brought it to my attention.

ElCapitanode commented 8 months ago

Everything in Working Order! [Insert Final Fantasy 7 Victory Fanfare] (New Version does give a windows defender trojan warning though)

GooglyBlox commented 8 months ago

Now THAT is weird - but I'm glad to hear it's working now! I'll look into why Windows Defender might be flagging it, but I haven't the faintest clue.