Update checkFileInfo

This commit is contained in:
Pol Dellaiera 2021-08-19 16:49:55 +02:00 committed by Marc Ducobu
parent 0a51785b8f
commit 73486d6860

View File

@ -19,7 +19,6 @@ use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\Security;
use Symfony\Component\Security\Core\User\UserProviderInterface;
final class ChillWopi implements WopiInterface
@ -34,8 +33,6 @@ final class ChillWopi implements WopiInterface
private TempUrlGeneratorInterface $tempUrlGenerator;
private Security $security;
private UserProviderInterface $userProvider;
public function __construct(
@ -44,7 +41,6 @@ final class ChillWopi implements WopiInterface
StoredObjectRepository $storedObjectRepository,
ClientInterface $httpClient,
TempUrlGeneratorInterface $tempUrlGenerator,
Security $security,
UserProviderInterface $userProvider
) {
$this->psr17 = $psr17;
@ -52,7 +48,6 @@ final class ChillWopi implements WopiInterface
$this->storedObjectRepository = $storedObjectRepository;
$this->httpClient = $httpClient;
$this->tempUrlGenerator = $tempUrlGenerator;
$this->security = $security;
$this->userProvider = $userProvider;
}
@ -88,9 +83,9 @@ final class ChillWopi implements WopiInterface
->withBody($this->psr17->createStream((string) json_encode(
[
'BaseFileName' => $storedObject->getFilename(),
'OwnerId' => $user->getUsername(),
'OwnerId' => uniqid(),
'Size' => 0,
'UserId' => $user->getUsername(),
'UserId' => uniqid(),
// 'Version' => 'v' . uniqid(),
'ReadOnly' => false,
'UserCanWrite' => true,