Download the PHP package ijin82/flysystem-webdav without Composer
On this page you can find all versions of the php package ijin82/flysystem-webdav. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ijin82/flysystem-webdav
More information about ijin82/flysystem-webdav
Files in ijin82/flysystem-webdav
Package flysystem-webdav
Short Description Laravel 5 service provider for Flysystem Webdav adapter (league/flysystem-webdav)
License MIT
Informations about the package flysystem-webdav
Flysystem Webdav service provider for Laravel 5
What is it for?
That is a ready-to-use service provider for flysystem-webdav
Why i need that?
You don't need that for sure, you can change service provider by yourself whatever you like (with installed flysystem-webdav)
Okay, I'm quite lazy guy, how to install this solution?
Now you have to be patient. It takes a couple minutes.
-
This is nginx-related solution (if someone ready to test Apache or lighttpd or etc. - welcome, let's extend description), so we have to set up nginx at first
- Set up nginx webdav host at first.
v1. Host for webdav server
Here we have nginx config (v1) for webdav host without subfolder for upload. Create path whatever you like from root. For all http requests that is not GET
type, service user have to be authorized (limit_except directive).
REM
If you have never used .htpasswd
before, you have to install apache utils
And then go to manual page
v2. Host for webdav server with subfolder
Here we have nginx config (v2) for webdav host with subfolder for upload. Create path whatever you like from subfolder (upload
folder name is not needed, change that if you like).
-
Now we have to create folder for webdav service with same access rights as nginx have
-
Ok, now test your nginx config and restart when ready
-
We've done with nginx, let's get deal with PHP side. Let's install this module for your Laravel app.
-
Now we have to set up service provider. Open your
config/app.php
and add new provider to providers section. - Let's configure new filesystem. Open your
config/filesystems.php
and add new fs config like this.
For sure, you have to use env
hepler for config, here is just an example config without it, just fyi.
Example description:
driver
- new webdav driver (check service provider source code)baseUri
- your webdav host namepath_prefix
- files folder prefix. If you plan to upload files for nginx configv2
, then you have to prefix your folder name with upload folder name, meaningupload/avatar/
forv2
nginx config, and simplyavatar/
forv1
config, because this parameter using for file upload and inv2
config we have to hit upload folder according to your nginx config.path_alias
- OPTIONAL parameter, in case if you like to access your upladed files by short path, for example your original upload prefix isupload/client/avatars/
and you want client-side file path looks like/av/file1.jpg
. Then you have to create symlink fromupload/client/avatars/
toav/
folder on your server (under your nginx root) and set uppath_alias
parameter asav/
. By default, yourpath_prefix
parameter will be user for uri generation.userName
- user name from your.htpasswd
used for file uploadpassword
- user password from your.htpasswd
used for file upload
Upload example
Get file url, blade example
Get file url, code example
Delete file example
Delete folder example
Check out original flysystem docs
Feel free to send pull requests and bug reports.