You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['REQUEST_METHOD'] === 'PUT') {
243
247
$expected = (int)$_SERVER['CONTENT_LENGTH'];
244
248
if ($count !== $expected) {
245
-
thrownewBadRequest('Expected filesize of ' . $expected . 'bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) ' . $count . 'bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.');
249
+
thrownewBadRequest($this->l->t('Expected filesize of %1$d bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) %2$d bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.', [$expected, $count]));
246
250
}
247
251
}
248
252
} catch (\Exception$e) {
@@ -533,7 +537,7 @@ private function createFileChunked($data) {
533
537
$expected = (int)$_SERVER['CONTENT_LENGTH'];
534
538
if ($bytesWritten !== $expected) {
535
539
$chunk_handler->remove($info['index']);
536
-
thrownewBadRequest('Expected filesize of ' . $expected . 'bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) ' . $bytesWritten . 'bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.');
540
+
thrownewBadRequest($this->l->t('Expected filesize of %1$d bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) %2$d bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.', [$expected, $bytesWritten]));
0 commit comments