jkoop / laravel-webdav-blade

Blade file (and simple controller) to emit WebDAV

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Laravel WebDAV Blade

The WebDAV spec is a dumpster fire. Use this blade file (and example supporting files) to make your life easier.

Tested with Laravel v9.12.2.

Usage

I tried my best to make the supporting files as self-explanatory as possible. Please feel free to read them.

Some notes

  • WebDAV uses the PROPFIND method to get information about a file or folder. It is a kind of POST request (with a body), but I'm ignoring it here because I can. The request body just specifies what properties to return; we just assume they want everything.
  • PROPFINDs must respond with a 207 Multi-Status response, or 401, 403, 404, etc.
  • Before making a PROPFIND request, the client will make an OPTIONS request to determine if the server supports WebDAV.
  • Headers are picky! You can't return from a Controller or Laravel will add headers like Cookie, etc. Instead, you must exit().

About

Blade file (and simple controller) to emit WebDAV

License:GNU General Public License v2.0


Languages

Language:PHP 60.8%Language:Blade 39.2%