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

Unable to download files in firefox browser. #1

Open
i2i8 opened this issue Oct 15, 2022 · 8 comments
Open

Unable to download files in firefox browser. #1

i2i8 opened this issue Oct 15, 2022 · 8 comments

Comments

@i2i8
Copy link

i2i8 commented Oct 15, 2022

Excuse me, I have a problem I want to know the solution: in firefox, whenever I want to download any exe file, click the download icon or file name, it will open the file instead of saving it, why?

@EthraZa
Copy link
Owner

EthraZa commented Oct 15, 2022

I have just tested it here with Firefox 105.0.3 and Brave 1.44.112 (106.0.5249.119) and it worked as expected.

Please, try it on my download files, if it works will probably be something with your Nginx config, if not, probably something with your Firefox (maybe some addon):
My Downloads

@i2i8
Copy link
Author

i2i8 commented Oct 15, 2022

I have just tested it here with Firefox 105.0.3 and Brave 1.44.112 (106.0.5249.119) and it worked as expected.

Please, try it on my download files, if it works will probably be something with your Nginx config, if not, probably something with your Firefox (maybe some addon): My Downloads

My Firefox version is 105.0.3 (64bit). When I download this link: https://www.ghsix.com.br/arquivos/downloads/AVB27-1.EXE This file is saved as: AVB27-1.EXE.htm,The extension is not .exe but .htm

@i2i8
Copy link
Author

i2i8 commented Oct 15, 2022

Another problem is that when I return to the upper level directory, the page only displays in red: SyntaxError: JSON parse: unexpected character at line 1 column 1 of the JSON data

@i2i8
Copy link
Author

i2i8 commented Oct 15, 2022

Can you achieve the same effect without using json? I'm not very good at it, so I still need your help.

@i2i8
Copy link
Author

i2i8 commented Oct 15, 2022

I try to use other templates that do not use json, and this kind of problem will not occur.

@EthraZa
Copy link
Owner

EthraZa commented Oct 15, 2022

Just downloaded this specific file and the name was ok.
Downloading using Brave mobile on Android, added the domain to the filename, but the rest of the filename and the extension remained ok.
I'm on Linux and have no Windows to test it right now. If it's not working in FF and Chome for you, it may have something to do with Antivirus.

About the go to upper directory error, it's something I've never experienced too.

Try disable all your addons to see if it helps, try in a different browser and try in a different PC or smartphone to see what happens.

About the Nginx JSON output, it's the only way to get the file listing to be read and manippulated by JavaScript. I guess it could be accomplished with XML output too, but would render a worse performance compared to JSON.

Can you point me another "template" that works for you so I can check it?

@i2i8
Copy link
Author

i2i8 commented Oct 16, 2022

Just downloaded this specific file and the name was ok. Downloading using Brave mobile on Android, added the domain to the filename, but the rest of the filename and the extension remained ok. I'm on Linux and have no Windows to test it right now. If it's not working in FF and Chome for you, it may have something to do with Antivirus.

About the go to upper directory error, it's something I've never experienced too.

Try disable all your addons to see if it helps, try in a different browser and try in a different PC or smartphone to see what happens.

About the Nginx JSON output, it's the only way to get the file listing to be read and manippulated by JavaScript. I guess it could be accomplished with XML output too, but would render a worse performance compared to JSON.

Can you point me another "template" that works for you so I can check it?

I think this is also good(https://github.com/kaiby/autoindex), but it does not search for files. It is troublesome for many files to find. At the same time, the column width spacing of file name, time, and size is too small, and the display of long file names is incomplete. If you can solve these problems, it would be great.

@EthraZa
Copy link
Owner

EthraZa commented Oct 16, 2022

This one is very elegant. But it's a different approach, in fact. I receive the data in JSON and process in JS, this other one, differently, receives the data from the list in HTML and only adds a CSS and a minimum of JS.
This one seems by its nature to be faster to render than mine. And, for example, the search is done by CTRL+F in the browser.
I might have liked it if I had found it before I made mine. Today, unfortunately, I'm busy with other projects and wouldn't have time to revisit this project, mainly because costumers who use it never have a problem, as long as I'm careful with the amount of files on the same page. But I'll remember this one in the future, in case I need to revisit that.

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

2 participants