dom111/webdav-js

Unable to create directory that contains spaces

dom111 opened this issue · 10 comments

Unable to create directory that contains spaces

This is actually warned in the code directly, I can't remember why I added that feature (it was a while ago) so I'll experiment with adding that in and get it tested.

Hey @nielll,

Not sure if you'll get this ping, but I've updated the project to handle creating a directory with spaces in the name now. I've tested it locally with success, but I'd love some feedback if you have the time!

Thanks,

Dom

I tested your changes and I'm happy with it. Just the alert window contains %20 characters for spaces, but that doesn't bother me. Thx

@dom111 It is a little bit annoying that, when I rename a file or folder which contains spaces the filename is written inside the input field with '%20'. So I need to first delete %20 and enter spaces, otherwise I get the alert back that the filename is bad. If you could insert spaces instead of '%20' would make it easier.

Hey @nielll,

I'm not seeing that behaviour my end... Are you using the CDN URLs? It might be that they are out of date! Using the docker instance built from test/ shows this correctly. I am however working on a commit to ensure file.title is always used in place of file.name in all notifications and within the prefilled text in the prompt.

I'll push this out shortly.

Thanks!

Dom

I'm using the boorkmarklet from the README.md. Those are the right cdn's? As I saw they are out of date indeed, how do I need to proceed?

Ok, that makes sense.

It should be possible to test using:

javascript:!function(){var t;t=["https://rawgit.com/noelboss/featherlight/1.7.1/release/featherlight.min.js","https://rawgit.com/google/code-prettify/master/loader/run_prettify.js?autorun=false","https://rawgit.com/notifyjs/notifyjs/master/dist/notify.js","https://rawgit.com/noelboss/featherlight/1.7.1/release/featherlight.min.css","https://rawgit.com/dom111/webdav-js/master/assets/css/style-min.css","https://rawgit.com/dom111/webdav-js/master/src/webdav-min.js"];var e,s=document.getElementsByTagName("head")[0],n=function(t,e){var a=document.createElement("script");a.src=t,a.type="text/javascript",e&&(a.onload=e),s.appendChild(a)};n("https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js",function(){t.forEach(function(t){var e,a;t.match(/css$/)?(e=t,(a=document.createElement("link")).href=e,a.rel="stylesheet",s.appendChild(a)):n(t)})}),(e=document.createElement("meta")).name="viewport",e.content="width=device-width, initial-scale=1",s.appendChild(e)}();

The cdn's are not working for me. https://file.titlerawgit.com/.. I get no response from those links. I also read that rawgit.com is shutting down their service.

Update:

javascript:!function(){var t;t=["https://cdn.jsdelivr.net/gh/noelboss/featherlight@1.7.1/release/featherlight.min.js","https://cdn.jsdelivr.net/gh/google/code-prettify/loader/run_prettify.js?autorun=false","https://cdn.jsdelivr.net/gh/notifyjs/notifyjs/dist/notify.js","https://cdn.jsdelivr.net/gh/noelboss/featherlight@1.7.1/release/featherlight.min.css","https://cdn.jsdelivr.net/gh/dom111/webdav-js/assets/css/style-min.css","https://cdn.jsdelivr.net/gh/dom111/webdav-js/src/webdav-min.js"];var e,s=document.getElementsByTagName("head")[0],n=function(t,e){var a=document.createElement("script");a.src=t,a.type="text/javascript",e&&(a.onload=e),s.appendChild(a)};n("https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js",function(){t.forEach(function(t){var e,a;t.match(/css$/)?(e=t,(a=document.createElement("link")).href=e,a.rel="stylesheet",s.appendChild(a)):n(t)})}),(e=document.createElement("meta")).name="viewport",e.content="width=device-width, initial-scale=1",s.appendChild(e)}();

I migrated the rawgit cdn's to jsdelivr and is uptodate now ;)

https://www.jsdelivr.com/rawgit

Yeah, so I did a find/replace (badly!) so it shouldn't have had file.title, oops!

But glad you found a solution!

I need to update the bookmarklet and Apache CDN examples based on your info too. Thank you! I'll raise a separate issue for that.

In the meantime, please confirm if you're seeing everything working as expected and if so, please close this!

Thanks for your time!

It works perfectly, you can close this issue 👍