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
Provide output in json #126
Comments
The JSON output should be available in which pages? Browse only? Or do you want the content of a file too? |
From @dustinromey on August 10, 2016 20:43 In my case its browse only. My specific use case is the following: I have some files I want to sync to a mobile app. So the plan is to grab json showing the folders and files on the page, and then run through the json to grab the files that it does not currently have (or have been updated, etc.) In an ideal case, it could grab the entire directory tree in one http request. But having to step through folders is okay. Its something I've been able to do with nginx with a couple of lines in nginx.conf. I'd like to do it in Caddy, and seems like it could be useful somewhat frequently. I'm assuming since it made it into the browse plugin, someone else found it useful too. |
Hey @dustinromey! I just pushed with a probable "fix" for this. Try it and tell me if you think that the JSON should be formatted in other way. :D You've to build it from source. |
From @dustinromey on August 18, 2016 20:21 Sorry it took so long. Had to figure out how to build with a plugin, so it took me a bit to get back to it. The only thing I notice that seems strange is there's a number appended to the end of the json. For example, on a very simple test directory I got the following: Note the 544 at the end. What is that? Otherwise looks great! |
From @dustinromey on August 7, 2016 21:35
Provide the file structure in json when the header "Accept: application/json" is included.
Copied from original issue: hacdias/filemanager-old#16
The text was updated successfully, but these errors were encountered: