diff --git a/resources/assets/js/vues/components/dropzone.js b/resources/assets/js/vues/components/dropzone.js index 587ec2030..6cfcecb40 100644 --- a/resources/assets/js/vues/components/dropzone.js +++ b/resources/assets/js/vues/components/dropzone.js @@ -13,8 +13,9 @@ function mounted() { let container = this.$el; let _this = this; this._dz = new DropZone(container, { - addRemoveLinks: true, - dictRemoveFile: trans('components.image_upload_remove'), + addRemoveLinks: true, + dictRemoveFile: trans('components.image_upload_remove'), + timeout: +window.dropZoneTimeout || 60000, url: function() { return _this.uploadUrl; }, @@ -26,6 +27,10 @@ function mounted() { data.append('_token', token); let uploadedTo = typeof _this.uploadedTo === 'undefined' ? 0 : _this.uploadedTo; data.append('uploaded_to', uploadedTo); + + xhr.ontimeout = function (e) { + _this.$events.emit('error', trans('errors.file_upload_timeout')); + } }); dz.on('success', function (file, data) { diff --git a/resources/lang/ar/errors.php b/resources/lang/ar/errors.php index 019b1ac87..6be77a1b4 100644 --- a/resources/lang/ar/errors.php +++ b/resources/lang/ar/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => 'الخادم لا يسمح برفع ملفات بهذا الحجم. الرجاء محاولة الرفع بحجم أصغر.', 'image_upload_error' => 'حدث خطأ خلال رفع الصورة', 'image_upload_type_error' => 'صيغة الصورة المرفوعة غير صالحة', + 'file_upload_timeout' => 'انتهت عملية تحميل الملف.', // Attachments 'attachment_page_mismatch' => 'Page mismatch during attachment update', // جار البحث عن الترجمة الأنسب diff --git a/resources/lang/de/errors.php b/resources/lang/de/errors.php index df941acd0..dc95d1d2b 100644 --- a/resources/lang/de/errors.php +++ b/resources/lang/de/errors.php @@ -32,6 +32,8 @@ return [ 'server_upload_limit' => 'Der Server verbietet das Hochladen von Dateien mit dieser Dateigröße. Bitte versuchen Sie es mit einer kleineren Datei.', 'image_upload_error' => 'Beim Hochladen des Bildes trat ein Fehler auf.', 'image_upload_type_error' => 'Der Bildtyp der hochgeladenen Datei ist ungültig.', + 'file_upload_timeout' => 'Der Upload der Datei ist abgelaufen.', + // Attachments 'attachment_page_mismatch' => 'Die Seite stimmte nach dem Hochladen des Anhangs nicht überein.', 'attachment_not_found' => 'Anhang konnte nicht gefunden werden.', diff --git a/resources/lang/en/errors.php b/resources/lang/en/errors.php index fb09841cf..f2ed4c17f 100644 --- a/resources/lang/en/errors.php +++ b/resources/lang/en/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => 'The server does not allow uploads of this size. Please try a smaller file size.', 'image_upload_error' => 'An error occurred uploading the image', 'image_upload_type_error' => 'The image type being uploaded is invalid', + 'file_upload_timeout' => 'The file upload has timed out.', // Attachments 'attachment_page_mismatch' => 'Page mismatch during attachment update', diff --git a/resources/lang/es/errors.php b/resources/lang/es/errors.php index b98f3aea8..9b2df45ff 100644 --- a/resources/lang/es/errors.php +++ b/resources/lang/es/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => 'El servidor no permite la subida de ficheros de este tamaño. Intente subir un fichero de menor tamaño.', 'image_upload_error' => 'Ha ocurrido un error al subir la imagen', 'image_upload_type_error' => 'El tipo de imagen que se quiere subir no es válido', + 'file_upload_timeout' => 'La carga del archivo ha caducado.', // Attachments 'attachment_page_mismatch' => 'Página no coincidente durante la subida del adjunto ', diff --git a/resources/lang/es_AR/errors.php b/resources/lang/es_AR/errors.php index 46f69c6f0..2876274f0 100644 --- a/resources/lang/es_AR/errors.php +++ b/resources/lang/es_AR/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => 'El servidor no permite subir archivos de este tamaño. Por favor intente un tamaño menor.', 'image_upload_error' => 'Ha ocurrido un error al subir la imagen', 'image_upload_error' => 'Ha ocurrido un error al subir la imagen', 'image_upload_type_error' => 'El tipo de imagen subida es inválido.', + 'file_upload_timeout' => 'La carga del archivo ha caducado.', // Attachments 'attachment_page_mismatch' => 'Página no coincidente durante la subida del adjunto ', diff --git a/resources/lang/fr/errors.php b/resources/lang/fr/errors.php index b05289070..e758f6e5e 100644 --- a/resources/lang/fr/errors.php +++ b/resources/lang/fr/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => 'Le serveur n\'autorise pas l\'envoi d\'un fichier de cette taille. Veuillez essayer avec une taille de fichier réduite.', 'image_upload_error' => 'Une erreur est survenue pendant l\'envoi de l\'image', 'image_upload_type_error' => 'LE format de l\'image envoyée n\'est pas valide', + 'file_upload_timeout' => 'Le téléchargement du fichier a expiré.', // Attachments 'attachment_page_mismatch' => 'Page incorrecte durant la mise à jour du fichier joint', diff --git a/resources/lang/it/errors.php b/resources/lang/it/errors.php index e81489ff4..17be482c7 100755 --- a/resources/lang/it/errors.php +++ b/resources/lang/it/errors.php @@ -37,6 +37,7 @@ return [ 'server_upload_limit' => 'Il server non permette un upload di questa grandezza. Prova con un file più piccolo.', 'image_upload_error' => 'C\'è stato un errore caricando l\'immagine', 'image_upload_type_error' => 'Il tipo di immagine in upload non è valido', + 'file_upload_timeout' => 'Il caricamento del file è scaduto.', // Attachments 'attachment_page_mismatch' => 'Page mismatch during attachment update', diff --git a/resources/lang/ja/errors.php b/resources/lang/ja/errors.php index 5905237fd..8c13d4474 100644 --- a/resources/lang/ja/errors.php +++ b/resources/lang/ja/errors.php @@ -35,6 +35,7 @@ return [ 'cannot_create_thumbs' => 'このサーバはサムネイルを作成できません。GD PHP extensionがインストールされていることを確認してください。', 'server_upload_limit' => 'このサイズの画像をアップロードすることは許可されていません。ファイルサイズを小さくし、再試行してください。', 'image_upload_error' => '画像アップロード時にエラーが発生しました。', + 'file_upload_timeout' => 'ファイルのアップロードがタイムアウトしました。', // Attachments 'attachment_page_mismatch' => '添付を更新するページが一致しません', diff --git a/resources/lang/kr/errors.php b/resources/lang/kr/errors.php index 0a7689b9d..59dbfda2b 100644 --- a/resources/lang/kr/errors.php +++ b/resources/lang/kr/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => '해당 크기의 파일을 업로드하는것이 서버에서 제한됩니다. 파일 사이즈를 작게 줄이거나 서버 설정을 변경하세요.', 'image_upload_error' => '이미지를 업로드하는 중에 오류가 발생했습니다.', 'image_upload_type_error' => '업로드중인 이미지 유형이 잘못되었습니다.', + 'file_upload_timeout' => '파일 업로드가 시간 초과되었습니다.', // Attachments 'attachment_page_mismatch' => '첨부 파일 업데이트 중 페이지 불일치하였습니다.', diff --git a/resources/lang/nl/errors.php b/resources/lang/nl/errors.php index 7c0b74663..19dbbd8d1 100644 --- a/resources/lang/nl/errors.php +++ b/resources/lang/nl/errors.php @@ -35,6 +35,7 @@ return [ 'cannot_create_thumbs' => 'De server kon geen thumbnails maken. Controleer of je de GD PHP extensie geïnstalleerd hebt.', 'server_upload_limit' => 'Het afbeeldingsformaat is te groot. Probeer een kleinere bestandsgrootte.', 'image_upload_error' => 'Er ging iets fout bij het uploaden van de afbeelding', + 'file_upload_timeout' => 'Het uploaden van het bestand is verlopen.', // Attachments 'attachment_page_mismatch' => 'Bij het bijwerken van de bijlage bleek de pagina onjuist', diff --git a/resources/lang/pl/errors.php b/resources/lang/pl/errors.php index 633bf7a2d..cb70c75cb 100644 --- a/resources/lang/pl/errors.php +++ b/resources/lang/pl/errors.php @@ -35,6 +35,7 @@ return [ 'cannot_create_thumbs' => 'Serwer nie może utworzyć miniaturek. Upewnij się że rozszerzenie GD PHP zostało zainstalowane.', 'server_upload_limit' => 'Serwer nie pozwala na przyjęcie pliku o tym rozmiarze. Spróbuj udostępnić coś o mniejszym rozmiarze.', 'image_upload_error' => 'Wystąpił błąd podczas udostępniania obrazka', + 'file_upload_timeout' => 'Przesyłanie pliku przekroczyło limit czasu.', // Attachments 'attachment_page_mismatch' => 'Niezgodność stron podczas aktualizacji załącznika', diff --git a/resources/lang/pt_BR/errors.php b/resources/lang/pt_BR/errors.php index 0c00a66a0..023254182 100644 --- a/resources/lang/pt_BR/errors.php +++ b/resources/lang/pt_BR/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => 'O servidor não permite o upload de arquivos com esse tamanho. Por favor, tente fazer o upload de arquivos de menor tamanho.', 'image_upload_error' => 'Um erro aconteceu enquanto o servidor tentava efetuar o upload da imagem', 'image_upload_type_error' => 'O tipo de imagem que está sendo feito upload é inválido', + 'file_upload_timeout' => 'O upload do arquivo expirou.', // Attachments 'attachment_page_mismatch' => 'Erro de \'Page mismatch\' durante a atualização do anexo', diff --git a/resources/lang/ru/errors.php b/resources/lang/ru/errors.php index 05d6d7921..6286425a9 100644 --- a/resources/lang/ru/errors.php +++ b/resources/lang/ru/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => 'Сервер не позволяет загружать файлы такого размера. Пожалуйста, попробуйте файл меньше.', 'image_upload_error' => 'Произошла ошибка при загрузке изображения.', 'image_upload_type_error' => 'Неправильный тип загружаемого изображения', + 'file_upload_timeout' => 'Выгрузка файла закончилась.', // Attachments 'attachment_page_mismatch' => 'Несоответствие страницы во время обновления вложения', diff --git a/resources/lang/sk/errors.php b/resources/lang/sk/errors.php index d4c7b7a3a..05277014b 100644 --- a/resources/lang/sk/errors.php +++ b/resources/lang/sk/errors.php @@ -35,6 +35,7 @@ return [ 'cannot_create_thumbs' => 'Server nedokáže vytvoriť náhľady. Skontrolujte prosím, či máte nainštalované GD rozšírenie PHP.', 'server_upload_limit' => 'Server nedovoľuje nahrávanie súborov s takouto veľkosťou. Skúste prosím menší súbor.', 'image_upload_error' => 'Pri nahrávaní obrázka nastala chyba', + 'file_upload_timeout' => 'Nahrávanie súboru vypršalo.', // Attachments 'attachment_page_mismatch' => 'Page mismatch during attachment update', diff --git a/resources/lang/sv/errors.php b/resources/lang/sv/errors.php index 37526802e..3c0659e83 100644 --- a/resources/lang/sv/errors.php +++ b/resources/lang/sv/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => 'Servern tillåter inte så här stora filer. Prova en mindre fil.', 'image_upload_error' => 'Ett fel inträffade vid uppladdningen', 'image_upload_type_error' => 'Filtypen du försöker ladda upp är ogiltig', + 'file_upload_timeout' => 'Filuppladdningen har tagits ut.', // Attachments 'attachment_page_mismatch' => 'Fel i sidmatchning vid uppdatering av bilaga', diff --git a/resources/lang/zh_CN/errors.php b/resources/lang/zh_CN/errors.php index ebc26d8a0..aa1c648d4 100644 --- a/resources/lang/zh_CN/errors.php +++ b/resources/lang/zh_CN/errors.php @@ -37,7 +37,8 @@ return [ 'server_upload_limit' => '服务器不允许上传此大小的文件。 请尝试较小的文件。', 'uploaded' => 'The server does not allow uploads of this size. Please try a smaller file size.', 'image_upload_error' => '上传图片时发生错误', - 'image_upload_type_error' => '上传的图像类型无效', + 'image_upload_type_error' => '上传的图像类型无效', + 'file_upload_timeout' => '文件上传已超时。', // Attachments 'attachment_page_mismatch' => '附件更新期间的页面不匹配', diff --git a/resources/lang/zh_TW/errors.php b/resources/lang/zh_TW/errors.php index de3d8c2c0..2e8050cde 100644 --- a/resources/lang/zh_TW/errors.php +++ b/resources/lang/zh_TW/errors.php @@ -38,6 +38,7 @@ return [ 'uploaded' => '上傳的檔案大小超過伺服器允許上限。請嘗試較小的檔案。', 'image_upload_error' => '上傳圖片時發生錯誤', 'image_upload_type_error' => '上傳圖片類型錯誤', + 'file_upload_timeout' => '文件上傳已超時。', // Attachments 'attachment_page_mismatch' => '附件更新期間的頁面不符合',