Skip to content
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

Webumenia 2108 with upm 3 #1046

Closed
wants to merge 14 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[import] fix spaces in webdav paths
  • Loading branch information
rastislav-chynoransky committed Dec 20, 2024
commit b75efd937734b04bae6d594d5258a280e283410a
18 changes: 18 additions & 0 deletions app/Filesystem/WebDAVAdapter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace App\Filesystem;

use League\Flysystem\FileAttributes;
use League\Flysystem\WebDAV\WebDAVAdapter as BaseWebDAVAdapter;

/**
* This class is a workaround for the issue of handling spaces in paths
*/
class WebDAVAdapter extends BaseWebDAVAdapter
{
public function lastModified(string $path): FileAttributes
{
$path = $this->encodePath($path);
return parent::lastModified($path);
}
}
2 changes: 1 addition & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php namespace App\Providers;

use App\Filesystem\WebDAVAdapter;
use App\Elasticsearch\Repositories\AuthorityRepository;
use App\Elasticsearch\Repositories\ItemRepository;
use App\Enums\FrontendEnum;
@@ -15,7 +16,6 @@
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\ServiceProvider;
use League\Flysystem\Filesystem;
use League\Flysystem\WebDAV\WebDAVAdapter;
use Sabre\DAV\Client;

class AppServiceProvider extends ServiceProvider
Loading