File Manager return JSON?

Playing with the File Manager plugin and wondering if it can return JSON rather than html. I tried changing the Content Header like the Browse plugin suggests, but doesn’t look like that does it.

Thanks!

1 Like

(Pinging @hacdias)

So it just occurred to me I should be able to do something like this in the caddyfile:

browse /photos

filemanager {
show photos on /photosmanage
}

Then if I request mysite.com/photos with a header of “Accept: application/json”, I should get the json list, but can still use the filemanager plugin in the same folder by visiting mysite.com/photosmanage.

Does that sound right?

I think there would be a conflict. But I will add that feature to File Manager :slight_smile: Probably during the next week it will be available, building from source (not on caddyserver website).

Thanks, I’ll keep an eye out.

To be “correct” about it, I’ll open an issue in GitHub.

1 Like

Sure! And thanks for doing that. It’s easier or my to keep track on things.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.