-
Notifications
You must be signed in to change notification settings - Fork 120
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
Added upload file feature #55
base: master
Are you sure you want to change the base?
Conversation
The URL -> File rule's "Edit File" button would be replaced by an Upload File button. Instead of writing text in the extension, you can just upload a file. |
Oh I misunderstood what you meant in #54 I thought you meant like, have Resource Override retain read access to that file indefinitely so even if you edit that file via your favorite editor outside of chrome, the changes are automatically reflected inside RO. The API I thought might be involved would be this one: https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API In any case, this is still a good idea. The only thing I would ask is, we should keep the "Edit File" button going to the text editor page. Then somewhere in there, we could have a "upload file" button which would replace all the text in the editor with the uploaded file. |
Hey, @kylepaulsen! Thanks for your quick responses on this. Honestly, I did mean that in #54. I am a Firefox user, and noticed that the API you mentioned is not supported by Firefox. I think you’re right that the edit button should still be there. I may just be lazy, but I’d also like to be able to upload a file straight from the main screen. I think over time it would save me a lot of clicks. Would it be unreasonable to have both buttons? |
Hmm maybe. I'll think about it. Have you tried using an http server first and using URL -> URL rules?
I know getting an http server set up can be annoying, but if you can easily do it, then you already have the feature you want. If you already tried this and still wish you had a upload button or this doesnt fit your use case, disregard what I said above. |
I haven't tried serving up my own http server... I have been using this extension as a replacement for Fiddler, because I find that Fiddler begins to interfere with other applications, and is a bit overkill for my requirements. Do you think there would be any issues with an http server? I am not too well versed on this... Also, I think I will submit another PR where there is a 'URL -> File (Editor)' rule and a 'URL -> File (Upload)' rule. Seems like the best of both worlds. Thoughts? |
I definitely think you should try out an http server. Since you know how to program, I think you would get it quickly. For me, I just have to open a terminal, navigate where I want to host files, and just type The only complications you could run into is trying to serve https content. I could try to explain what to do if you run into that. I also have a fork of the http server I linked above that tries to do all the hard parts for you, but it's horribly outdated. Just in case you wanted to look tho: https://github.com/kylepaulsen/http-server (looks the same, but there's a different way to install). Anyway, I'm hesitant to clutter up the main page with more UI. I still think the best place would be in the edit file area. If you're adamant about minimizing clicks, one thing that I'm not completely against might be a very tiny button next to the "Edit File" button. Maybe it just uses a small icon to represent uploading a file. Technically this extension is supposed to be in "maintenance mode" where I'm accepting no new features. However, I find myself having to fix things in a dramatic way because of manifest version 3 being forced on chrome extensions. The codebase is basically being rewritten at the moment. I guess this is just a heads up, that things may change dramatically, and your changes probably wont merge easily (or I'll just have to rewrite the feature anyway). |
No description provided.