Shared-Reality-Lab / IMAGE-browser

IMAGE project browser extensions & client-side code
Other
2 stars 0 forks source link

Local photo files no longer work with extension #278

Closed jeffbl closed 1 year ago

jeffbl commented 1 year ago

Load latest released extension (for me, in Chrome on Linux) Pull a local file into browser window, so that you're just viewing a local photo file in your browser Right click photo Get IMAGE rendering EXPECT: rendering returned, as it did in past (this is a regression) NOTE: Nothing happens. NOTE: @JRegimbal reports error TypeError: Cannot read properties of undefined (reading 'postMessage')

Possible related: I don't know if it is the same issue, but I find that I also get no response when I am viewing a file that is on a website, but it is just the photo, and it is accessed via https on a site that has some kind of certificate error. For me, in Chrome on Linux, this includes this URL. If this can be reproduced, and is not a symptom of the same bug, it should be broken out into a separate issue.

JRegimbal commented 1 year ago

I'm thinking that if we want local files to be loaded, maybe we can add a new page to the extension where we allow people to manually upload the through the regular file dialogue? I'm assuming (hopefully correctly) that there may be fewer security limitations on files uploaded to a page we control in the extension.

jaydeepsingh25 commented 1 year ago

Definitely we can think about the option to manually upload local files. For now, i have given fix by changing the Request mode to "same-origin" only for local files and it is working. And @jeffbl for the issue related to this URL, it is working fine for me with Chrome extension on windows, can you please check if it is still not working for you?

jeffbl commented 1 year ago

@jaydeepsingh25 I downloaded the nightly build for today, and the photo at this URL now works. But I didn't get any certificate errors when loading it in chrome today, so I'm not sure if I'm testing the same thing.

It also works on a local file I loaded frome my hard drive, which is great.

The suggestion from @JRegimbal above sounds like a separate feature request. If that makes sense, please log a separate issue and I'll put it into backlog unless there is a pressing need to do it soon.