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

Edit files without extension #314

Closed
eine opened this issue Dec 27, 2017 · 4 comments
Closed

Edit files without extension #314

eine opened this issue Dec 27, 2017 · 4 comments

Comments

@eine
Copy link
Contributor

eine commented Dec 27, 2017

This issue is split from #302.

Currently double clicking is the only way to open the editor in order to modify the content of a file. However, it does not work if the file has no extension. Instead, it shows a black box covering all the page which suggests to download it. I think opening any file as text should be allowed.

Somehow related to this, I don't know if using double click to open folders and files is good for smartphones and other touch devices. Since there is already a 'Select multiple' activation option and both Ctrl+Click and Shift+Click work on desktops, I suggest making a single click open the file/folder. Moreover, this is coherent with default browsers' behaviour.

hacdias
What if we try to open a binary file without extension?

There is no problem at all to open a binary file with a text edior. In the worst case you get non-understandable characters, e.g.:

E  èx"  …íÇ��   �…¶ýÿÿ1ÀH‡�é¬ýÿÿH‰Ñÿ�‡~  é&ýÿÿH‹��E  H‹
ôD  Ç��   è9"  émýÿÿE1íéæþÿÿ‰ÁèÍ!  ���@ Hƒì(H‹�5E  Ç �   èZ
  è¥üÿÿ��HƒÄ(Ãfffff.��„     Hƒì(H‹��E  Ç     è*
  èuüÿÿ��HƒÄ(Ã��������������UH‰å]Ãf.��„     UH‰åHƒì Hƒ= +   t0H�
‡:  ÿ�±}  H…Àt/H��ƒ:  H‰Áÿ�¤}  H…Àt	H�

Moreover, some binary files use extensions such as .bin, .run, .exec... Therefore, I think it is better to not filter by name at all.

Shall JavaScript or golang provide some mechanism to identify if a file is going to be readable by a human, a filter can be applied based on that guess. The filter would show a warning letting the user know that the opened file is expected to be hardly readable.

@chinglinwen
Copy link
Contributor

chinglinwen commented Jan 18, 2018

Really wanted this, ( say edit a Dockerfile, or any text file )

I also found it can't edit new create file ( from the ui and console, named a.go ), I've seen some real go code file can be open and editing, don't know why this (say b.go ) can't ( echo aa > b.go )

@hacdias
Copy link
Member

hacdias commented Feb 18, 2018

Are you suggesting something like #358? Could you both check if it serves your needs?

@eine
Copy link
Contributor Author

eine commented Feb 18, 2018

@hacdias, it works fine for me!

Example:

git clone -b edit-everything https://github.com/filebrowser/filebrowser
cd filebrowser
docker build -t filebrowser/filebrowser .
docker run --rm -itv $(pwd):/srv -p 80:80 filebrowser/filebrowser --no-auth -p 80

Now Dockerfile can be edited.


Yet, you might want to make #358 optional, so that users willing to provide limited edition can configure it. I mean, I would not drop the existing feature.

@hacdias
Copy link
Member

hacdias commented Dec 29, 2018

Hello! Will be available on v2.0! I'm closing this to remove the clutter in the meanwhile. For more info, check #574 and #575!

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

Successfully merging a pull request may close this issue.

3 participants