dom111 / webdav-js

A simple WebDAV client written in JS for use as a bookmarklet, or integration into a web server.
MIT License
85 stars 17 forks source link

Creating Directory, Uploading File & Refresh #88

Open jamesbrindle opened 3 years ago

jamesbrindle commented 3 years ago

Hi,

Thanks for the awesome tool by the way!

I was wondering if someone could help me...

When uploading a file, or creating a directory, the list doesn't refresh (i'm using Chrome).

I've added a refresh button, and put in a 'location.reload()' upon creating a directory or uploading a file - Which works fine, except if the user has navigated to a sub-directory - Then the refresh doesn't have the index.html so doesn't load...

Is there a function I can use to reload the list?

Thanks in advance.

jamesbrindle commented 3 years ago

Well I sort of found a workaround:

    var refreshUrl = location.protocol + '//' + location.host + location.pathname + '#' + uuidv4();                     
    t.trigger("go", refreshUrl);                                          

In a couple of places. Seems to do the trick.

dom111 commented 1 year ago

Hey there, thanks for your feedback on this!

I've just completed a refactor (released as 2.2.0) of the codebase and the automatic refreshing should work somewhat better now.

If you have time, it'd be great to get some feedback on this!

Thanks!

Dom