Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all/more protocols? (FTP) #60

Open
Vagmer opened this issue Sep 23, 2019 · 7 comments
Open

Support all/more protocols? (FTP) #60

Vagmer opened this issue Sep 23, 2019 · 7 comments

Comments

@Vagmer
Copy link

Vagmer commented Sep 23, 2019

Sometimes it is most preferable to browse FTP with the browser... The extension doesn't function for files accessed by FTP, so that when clicking a link to (for example) an image file on a FTP server, the normal Firefox download dialog is shown directly instead, rather than the addon's dialog which would allow viewing the image within the browser.
Is it possible to support protocols other than HTTP?

Also, could you add explicit "Video" and "Audio" (or just one for both) file type options to the drop list (that already contains "Image", "PDF", etc) for "Open in browser as"?

Thanks for this addon! It is odd that this functionality is not native to the browser.

@Rob--W
Copy link
Owner

Rob--W commented Sep 23, 2019

The extension uses the webRequest extension API to intercept requests. In Firefox, ftp requests are not visible to the extension via this API.

I thought that this used to work partially, but now it seems that ftp requests are not visible at all (tested in Firefox 69) - https://bugzilla.mozilla.org/show_bug.cgi?id=1312460

Also, could you add explicit "Video" and "Audio" (or just one for both) file type options to the drop list (that already contains "Image", "PDF", etc) for "Open in browser as"?

What are the use cases? Does the "MIME from file extension" or "Server sent MIME" options serve your needs?

@Vagmer
Copy link
Author

Vagmer commented Sep 24, 2019

Thanks for the quick reply. I see, that's too bad. Is there no workaround possible... even a manual one, to open an FTP resource in the browser?

What are the use cases? Does the "MIME from file extension" or "Server sent MIME" options serve your needs?

Yeah, those typically work, and when they don't, you can still manually type and select a video/audio type in "Other", and that works too. The use case is the same as the other explicit ones like "Web page", "Image", "PDF" - a shortcut for when there is no extension or a generic/irrelevant type or extension is given.

@Rob--W
Copy link
Owner

Rob--W commented Sep 28, 2019

Is there no workaround possible... even a manual one, to open an FTP resource in the browser?

I don't think so, short of reading the FTP resource through a (HTTP) proxy.

@richfelker
Copy link

I hit this too for file:// URLs. I want to be able to open text files (with extensions other than .txt, like source code files) in the browser, as well as PDFs. This used to work, but since a recent Firefox upgrade, open-in-browser no longer seems to have access, and Firefox always prompts me to "download" (lol) or open with an external application (which I don't want).

@Rob--W
Copy link
Owner

Rob--W commented Jul 15, 2021

I hit this too for file:// URLs. I want to be able to open text files (with extensions other than .txt, like source code files) in the browser, as well as PDFs. This used to work, but since a recent Firefox upgrade, open-in-browser no longer seems to have access, and Firefox always prompts me to "download" (lol) or open with an external application (which I don't want).

When/how did this work? Extensions in Firefox cannot intercept file://-requests.

@richfelker
Copy link

I thought it worked before. Maybe I'm misremembering and Firefox just previously did less-stupid things with synthesized MIME types, or allowed viewing of text/* rather than just text/plain or something, so that it worked without OIB.

@Rob--W
Copy link
Owner

Rob--W commented Jul 15, 2021

I thought it worked before. Maybe I'm misremembering and Firefox just previously did less-stupid things with synthesized MIME types, or allowed viewing of text/* rather than just text/plain or something, so that it worked without OIB.

If you have a specific test case, please write down the specific steps. Then use mozregression (https://mozilla.github.io/mozregression/) to try and identify the cause of the behavioral change, and then report a bug at https://bugzilla.mozilla.org if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants