mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
Update checkFileInfo
This commit is contained in:
parent
0a51785b8f
commit
73486d6860
@ -19,7 +19,6 @@ use Psr\Http\Client\ClientInterface;
|
|||||||
use Psr\Http\Message\RequestInterface;
|
use Psr\Http\Message\RequestInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
||||||
use Symfony\Component\Security\Core\Security;
|
|
||||||
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||||
|
|
||||||
final class ChillWopi implements WopiInterface
|
final class ChillWopi implements WopiInterface
|
||||||
@ -34,8 +33,6 @@ final class ChillWopi implements WopiInterface
|
|||||||
|
|
||||||
private TempUrlGeneratorInterface $tempUrlGenerator;
|
private TempUrlGeneratorInterface $tempUrlGenerator;
|
||||||
|
|
||||||
private Security $security;
|
|
||||||
|
|
||||||
private UserProviderInterface $userProvider;
|
private UserProviderInterface $userProvider;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
@ -44,7 +41,6 @@ final class ChillWopi implements WopiInterface
|
|||||||
StoredObjectRepository $storedObjectRepository,
|
StoredObjectRepository $storedObjectRepository,
|
||||||
ClientInterface $httpClient,
|
ClientInterface $httpClient,
|
||||||
TempUrlGeneratorInterface $tempUrlGenerator,
|
TempUrlGeneratorInterface $tempUrlGenerator,
|
||||||
Security $security,
|
|
||||||
UserProviderInterface $userProvider
|
UserProviderInterface $userProvider
|
||||||
) {
|
) {
|
||||||
$this->psr17 = $psr17;
|
$this->psr17 = $psr17;
|
||||||
@ -52,7 +48,6 @@ final class ChillWopi implements WopiInterface
|
|||||||
$this->storedObjectRepository = $storedObjectRepository;
|
$this->storedObjectRepository = $storedObjectRepository;
|
||||||
$this->httpClient = $httpClient;
|
$this->httpClient = $httpClient;
|
||||||
$this->tempUrlGenerator = $tempUrlGenerator;
|
$this->tempUrlGenerator = $tempUrlGenerator;
|
||||||
$this->security = $security;
|
|
||||||
$this->userProvider = $userProvider;
|
$this->userProvider = $userProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,9 +83,9 @@ final class ChillWopi implements WopiInterface
|
|||||||
->withBody($this->psr17->createStream((string) json_encode(
|
->withBody($this->psr17->createStream((string) json_encode(
|
||||||
[
|
[
|
||||||
'BaseFileName' => $storedObject->getFilename(),
|
'BaseFileName' => $storedObject->getFilename(),
|
||||||
'OwnerId' => $user->getUsername(),
|
'OwnerId' => uniqid(),
|
||||||
'Size' => 0,
|
'Size' => 0,
|
||||||
'UserId' => $user->getUsername(),
|
'UserId' => uniqid(),
|
||||||
// 'Version' => 'v' . uniqid(),
|
// 'Version' => 'v' . uniqid(),
|
||||||
'ReadOnly' => false,
|
'ReadOnly' => false,
|
||||||
'UserCanWrite' => true,
|
'UserCanWrite' => true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user