🐛 Try to avoid clients constantly hitting /download/XXX
This commit is contained in:
parent
a82ad6c300
commit
1adf8e7455
|
@ -41,7 +41,7 @@ msgstr "%1 sent you files"
|
||||||
msgid "%1 used your invitation to send you files:"
|
msgid "%1 used your invitation to send you files:"
|
||||||
msgstr "%1 used your invitation to send you files:"
|
msgstr "%1 used your invitation to send you files:"
|
||||||
|
|
||||||
#: lib/Lufi/Controller/Invitation.pm:159 lib/Lufi/Controller/Invitation.pm:84 themes/default/templates/invitations/my_invitations.html.ep:51 themes/default/templates/invitations/my_invitations.html.ep:52 themes/default/templates/invitations/my_invitations.html.ep:53 themes/default/templates/invitations/notification_files_sent.mail.ep:12
|
#: lib/Lufi/Controller/Invitation.pm:160 lib/Lufi/Controller/Invitation.pm:85 themes/default/templates/invitations/my_invitations.html.ep:51 themes/default/templates/invitations/my_invitations.html.ep:52 themes/default/templates/invitations/my_invitations.html.ep:53 themes/default/templates/invitations/notification_files_sent.mail.ep:12
|
||||||
msgid "%A %d %B %Y at %T"
|
msgid "%A %d %B %Y at %T"
|
||||||
msgstr "%A %d %B %Y at %T"
|
msgstr "%A %d %B %Y at %T"
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ msgstr "Click on the following URL to upload files on Lufi:"
|
||||||
msgid "Click to open the file browser"
|
msgid "Click to open the file browser"
|
||||||
msgstr "Click to open the file browser"
|
msgstr "Click to open the file browser"
|
||||||
|
|
||||||
#: themes/default/templates/delays.html.ep:38 themes/default/templates/invitations/my_invitations.html.ep:80
|
#: themes/default/templates/delays.html.ep:42 themes/default/templates/invitations/my_invitations.html.ep:80
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr "Close"
|
msgstr "Close"
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ msgstr "Delete selected files"
|
||||||
msgid "Deletion link"
|
msgid "Deletion link"
|
||||||
msgstr "Deletion link"
|
msgstr "Deletion link"
|
||||||
|
|
||||||
#: themes/default/templates/delays.html.ep:8
|
#: themes/default/templates/delays.html.ep:9
|
||||||
msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file."
|
msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file."
|
||||||
msgstr "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file."
|
msgstr "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file."
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ msgstr "How to install the software on my server?"
|
||||||
msgid "How to report an illegal file?"
|
msgid "How to report an illegal file?"
|
||||||
msgstr "How to report an illegal file?"
|
msgstr "How to report an illegal file?"
|
||||||
|
|
||||||
#: themes/default/templates/delays.html.ep:7
|
#: themes/default/templates/delays.html.ep:8
|
||||||
msgid "If you choose a delay, the file will be deleted after that delay."
|
msgid "If you choose a delay, the file will be deleted after that delay."
|
||||||
msgstr "If you choose a delay, the file will be deleted after that delay."
|
msgstr "If you choose a delay, the file will be deleted after that delay."
|
||||||
|
|
||||||
|
@ -364,12 +364,12 @@ msgid "Invert selection"
|
||||||
msgstr "Invert selection"
|
msgstr "Invert selection"
|
||||||
|
|
||||||
#. ($i->guest_mail, $url)
|
#. ($i->guest_mail, $url)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:171
|
#: lib/Lufi/Controller/Invitation.pm:172
|
||||||
msgid "Invitation resent to %1.<br> URL: %2"
|
msgid "Invitation resent to %1.<br> URL: %2"
|
||||||
msgstr "Invitation resent to %1.<br> URL: %2"
|
msgstr "Invitation resent to %1.<br> URL: %2"
|
||||||
|
|
||||||
#. ($invitation->guest_mail, $url)
|
#. ($invitation->guest_mail, $url)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:87
|
#: lib/Lufi/Controller/Invitation.pm:88
|
||||||
msgid "Invitation sent to %1.<br> URL: %2"
|
msgid "Invitation sent to %1.<br> URL: %2"
|
||||||
msgstr "Invitation sent to %1.<br> URL: %2"
|
msgstr "Invitation sent to %1.<br> URL: %2"
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ msgstr "Show zip content"
|
||||||
msgid "Signin"
|
msgid "Signin"
|
||||||
msgstr "Signin"
|
msgstr "Signin"
|
||||||
|
|
||||||
#: lib/Lufi/Controller/Invitation.pm:283 themes/default/templates/invitations/exception.html.ep:16
|
#: lib/Lufi/Controller/Invitation.pm:284 themes/default/templates/invitations/exception.html.ep:16
|
||||||
msgid "Sorry, the invitation doesn’t exist. Are you sure you are on the right URL?"
|
msgid "Sorry, the invitation doesn’t exist. Are you sure you are on the right URL?"
|
||||||
msgstr "Sorry, the invitation doesn’t exist. Are you sure you are on the right URL?"
|
msgstr "Sorry, the invitation doesn’t exist. Are you sure you are on the right URL?"
|
||||||
|
|
||||||
|
@ -556,7 +556,7 @@ msgid "Sorry, your invitation has expired or has been deleted. Please contact %1
|
||||||
msgstr "Sorry, your invitation has expired or has been deleted. Please contact %1 to have another invitation."
|
msgstr "Sorry, your invitation has expired or has been deleted. Please contact %1 to have another invitation."
|
||||||
|
|
||||||
#. ($invitation->ldap_user_mail)
|
#. ($invitation->ldap_user_mail)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:276
|
#: lib/Lufi/Controller/Invitation.pm:277
|
||||||
msgid "The URLs of your files have been sent by email to %1."
|
msgid "The URLs of your files have been sent by email to %1."
|
||||||
msgstr "The URLs of your files have been sent by email to %1."
|
msgstr "The URLs of your files have been sent by email to %1."
|
||||||
|
|
||||||
|
@ -581,7 +581,7 @@ msgid "The email subject can't be empty."
|
||||||
msgstr "The email subject can't be empty."
|
msgstr "The email subject can't be empty."
|
||||||
|
|
||||||
#. ($expire_at, $max_expire_at)
|
#. ($expire_at, $max_expire_at)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:51
|
#: lib/Lufi/Controller/Invitation.pm:52
|
||||||
msgid "The expiration delay (%1) is not between 1 and %2 days."
|
msgid "The expiration delay (%1) is not between 1 and %2 days."
|
||||||
msgstr "The expiration delay (%1) is not between 1 and %2 days."
|
msgstr "The expiration delay (%1) is not between 1 and %2 days."
|
||||||
|
|
||||||
|
@ -599,17 +599,17 @@ msgid "The following email addresses are not valid: %1"
|
||||||
msgstr "The following email addresses are not valid: %1"
|
msgstr "The following email addresses are not valid: %1"
|
||||||
|
|
||||||
#. ($guest_mail)
|
#. ($guest_mail)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:48
|
#: lib/Lufi/Controller/Invitation.pm:49
|
||||||
msgid "The guest email address (%1) is unvalid."
|
msgid "The guest email address (%1) is unvalid."
|
||||||
msgstr "The guest email address (%1) is unvalid."
|
msgstr "The guest email address (%1) is unvalid."
|
||||||
|
|
||||||
#. ($i->token, $i->guest_mail)
|
#. ($i->token, $i->guest_mail)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:150
|
#: lib/Lufi/Controller/Invitation.pm:151
|
||||||
msgid "The invitation %1 can’t be resent: %2 has already sent files.<br>Please create a new invitation."
|
msgid "The invitation %1 can’t be resent: %2 has already sent files.<br>Please create a new invitation."
|
||||||
msgstr "The invitation %1 can’t be resent: %2 has already sent files.<br>Please create a new invitation."
|
msgstr "The invitation %1 can’t be resent: %2 has already sent files.<br>Please create a new invitation."
|
||||||
|
|
||||||
#. ($i->token)
|
#. ($i->token)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:130
|
#: lib/Lufi/Controller/Invitation.pm:131
|
||||||
msgid "The invitation %1 has been deleted."
|
msgid "The invitation %1 has been deleted."
|
||||||
msgstr "The invitation %1 has been deleted."
|
msgstr "The invitation %1 has been deleted."
|
||||||
|
|
||||||
|
@ -657,7 +657,7 @@ msgstr "This invitation is normally hidden"
|
||||||
msgid "This invitation is valid until %1."
|
msgid "This invitation is valid until %1."
|
||||||
msgstr "This invitation is valid until %1."
|
msgstr "This invitation is valid until %1."
|
||||||
|
|
||||||
#: themes/default/templates/delays.html.ep:10
|
#: themes/default/templates/delays.html.ep:13
|
||||||
msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:"
|
msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:"
|
||||||
msgstr "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:"
|
msgstr "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:"
|
||||||
|
|
||||||
|
@ -673,6 +673,10 @@ msgstr "URL"
|
||||||
msgid "Unable to copy the link(s) to your clipboard"
|
msgid "Unable to copy the link(s) to your clipboard"
|
||||||
msgstr "Unable to copy the link(s) to your clipboard"
|
msgstr "Unable to copy the link(s) to your clipboard"
|
||||||
|
|
||||||
|
#: themes/default/templates/partial/render.js.ep:13
|
||||||
|
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. ($short)
|
#. ($short)
|
||||||
#: lib/Lufi/Controller/Files.pm:433
|
#: lib/Lufi/Controller/Files.pm:433
|
||||||
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
|
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
|
||||||
|
@ -773,17 +777,17 @@ msgstr "Your file is too big: %1 (maximum size allowed: %2)"
|
||||||
msgid "Your password is not valid. Please refresh the page to retry."
|
msgid "Your password is not valid. Please refresh the page to retry."
|
||||||
msgstr "Your password is not valid. Please refresh the page to retry."
|
msgstr "Your password is not valid. Please refresh the page to retry."
|
||||||
|
|
||||||
#: themes/default/templates/partial/render.js.ep:13
|
#: themes/default/templates/partial/render.js.ep:14
|
||||||
msgid "Zip content:"
|
msgid "Zip content:"
|
||||||
msgstr "Zip content:"
|
msgstr "Zip content:"
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:20
|
#: themes/default/templates/delays.html.ep:24
|
||||||
msgid "between %1 and %2, the file will be kept %3 day(s)."
|
msgid "between %1 and %2, the file will be kept %3 day(s)."
|
||||||
msgstr "between %1 and %2, the file will be kept %3 day(s)."
|
msgstr "between %1 and %2, the file will be kept %3 day(s)."
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:22
|
#: themes/default/templates/delays.html.ep:26
|
||||||
msgid "between %1 and %2, the file will be kept forever."
|
msgid "between %1 and %2, the file will be kept forever."
|
||||||
msgstr "between %1 and %2, the file will be kept forever."
|
msgstr "between %1 and %2, the file will be kept forever."
|
||||||
|
|
||||||
|
@ -796,12 +800,12 @@ msgid "expires on XXX"
|
||||||
msgstr "expires on XXX"
|
msgstr "expires on XXX"
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:26
|
#: themes/default/templates/delays.html.ep:30
|
||||||
msgid "for %1 and more, the file will be kept %2 day(s)"
|
msgid "for %1 and more, the file will be kept %2 day(s)"
|
||||||
msgstr "for %1 and more, the file will be kept %2 day(s)"
|
msgstr "for %1 and more, the file will be kept %2 day(s)"
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:28
|
#: themes/default/templates/delays.html.ep:32
|
||||||
msgid "for %1 and more, the file will be kept forever."
|
msgid "for %1 and more, the file will be kept forever."
|
||||||
msgstr "for %1 and more, the file will be kept forever."
|
msgstr "for %1 and more, the file will be kept forever."
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ msgstr ""
|
||||||
msgid "%1 used your invitation to send you files:"
|
msgid "%1 used your invitation to send you files:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/Lufi/Controller/Invitation.pm:159 lib/Lufi/Controller/Invitation.pm:84 themes/default/templates/invitations/my_invitations.html.ep:51 themes/default/templates/invitations/my_invitations.html.ep:52 themes/default/templates/invitations/my_invitations.html.ep:53 themes/default/templates/invitations/notification_files_sent.mail.ep:12
|
#: lib/Lufi/Controller/Invitation.pm:160 lib/Lufi/Controller/Invitation.pm:85 themes/default/templates/invitations/my_invitations.html.ep:51 themes/default/templates/invitations/my_invitations.html.ep:52 themes/default/templates/invitations/my_invitations.html.ep:53 themes/default/templates/invitations/notification_files_sent.mail.ep:12
|
||||||
msgid "%A %d %B %Y at %T"
|
msgid "%A %d %B %Y at %T"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ msgstr ""
|
||||||
msgid "Click to open the file browser"
|
msgid "Click to open the file browser"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: themes/default/templates/delays.html.ep:38 themes/default/templates/invitations/my_invitations.html.ep:80
|
#: themes/default/templates/delays.html.ep:42 themes/default/templates/invitations/my_invitations.html.ep:80
|
||||||
msgid "Close"
|
msgid "Close"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -178,7 +178,7 @@ msgstr ""
|
||||||
msgid "Deletion link"
|
msgid "Deletion link"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: themes/default/templates/delays.html.ep:8
|
#: themes/default/templates/delays.html.ep:9
|
||||||
msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file."
|
msgid "Don't worry: if a user begins to download the file before the expiration and the download ends after the expiration, he will be able to get the file."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ msgstr ""
|
||||||
msgid "How to report an illegal file?"
|
msgid "How to report an illegal file?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: themes/default/templates/delays.html.ep:7
|
#: themes/default/templates/delays.html.ep:8
|
||||||
msgid "If you choose a delay, the file will be deleted after that delay."
|
msgid "If you choose a delay, the file will be deleted after that delay."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -364,12 +364,12 @@ msgid "Invert selection"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. ($i->guest_mail, $url)
|
#. ($i->guest_mail, $url)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:171
|
#: lib/Lufi/Controller/Invitation.pm:172
|
||||||
msgid "Invitation resent to %1.<br> URL: %2"
|
msgid "Invitation resent to %1.<br> URL: %2"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. ($invitation->guest_mail, $url)
|
#. ($invitation->guest_mail, $url)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:87
|
#: lib/Lufi/Controller/Invitation.pm:88
|
||||||
msgid "Invitation sent to %1.<br> URL: %2"
|
msgid "Invitation sent to %1.<br> URL: %2"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -534,7 +534,7 @@ msgstr ""
|
||||||
msgid "Signin"
|
msgid "Signin"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: lib/Lufi/Controller/Invitation.pm:283 themes/default/templates/invitations/exception.html.ep:16
|
#: lib/Lufi/Controller/Invitation.pm:284 themes/default/templates/invitations/exception.html.ep:16
|
||||||
msgid "Sorry, the invitation doesn’t exist. Are you sure you are on the right URL?"
|
msgid "Sorry, the invitation doesn’t exist. Are you sure you are on the right URL?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -556,7 +556,7 @@ msgid "Sorry, your invitation has expired or has been deleted. Please contact %1
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. ($invitation->ldap_user_mail)
|
#. ($invitation->ldap_user_mail)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:276
|
#: lib/Lufi/Controller/Invitation.pm:277
|
||||||
msgid "The URLs of your files have been sent by email to %1."
|
msgid "The URLs of your files have been sent by email to %1."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -581,7 +581,7 @@ msgid "The email subject can't be empty."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. ($expire_at, $max_expire_at)
|
#. ($expire_at, $max_expire_at)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:51
|
#: lib/Lufi/Controller/Invitation.pm:52
|
||||||
msgid "The expiration delay (%1) is not between 1 and %2 days."
|
msgid "The expiration delay (%1) is not between 1 and %2 days."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -599,17 +599,17 @@ msgid "The following email addresses are not valid: %1"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. ($guest_mail)
|
#. ($guest_mail)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:48
|
#: lib/Lufi/Controller/Invitation.pm:49
|
||||||
msgid "The guest email address (%1) is unvalid."
|
msgid "The guest email address (%1) is unvalid."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. ($i->token, $i->guest_mail)
|
#. ($i->token, $i->guest_mail)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:150
|
#: lib/Lufi/Controller/Invitation.pm:151
|
||||||
msgid "The invitation %1 can’t be resent: %2 has already sent files.<br>Please create a new invitation."
|
msgid "The invitation %1 can’t be resent: %2 has already sent files.<br>Please create a new invitation."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. ($i->token)
|
#. ($i->token)
|
||||||
#: lib/Lufi/Controller/Invitation.pm:130
|
#: lib/Lufi/Controller/Invitation.pm:131
|
||||||
msgid "The invitation %1 has been deleted."
|
msgid "The invitation %1 has been deleted."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -657,7 +657,7 @@ msgstr ""
|
||||||
msgid "This invitation is valid until %1."
|
msgid "This invitation is valid until %1."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: themes/default/templates/delays.html.ep:10
|
#: themes/default/templates/delays.html.ep:13
|
||||||
msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:"
|
msgid "This server sets limitations according to the file size. The expiration delay of your file will be the minimum between what you choose and the following limitations:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -673,6 +673,10 @@ msgstr ""
|
||||||
msgid "Unable to copy the link(s) to your clipboard"
|
msgid "Unable to copy the link(s) to your clipboard"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: themes/default/templates/partial/render.js.ep:13
|
||||||
|
msgid "Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#. ($short)
|
#. ($short)
|
||||||
#: lib/Lufi/Controller/Files.pm:433
|
#: lib/Lufi/Controller/Files.pm:433
|
||||||
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
|
msgid "Unable to get counter for %1. The file does not exists. It will be removed from your localStorage."
|
||||||
|
@ -773,17 +777,17 @@ msgstr ""
|
||||||
msgid "Your password is not valid. Please refresh the page to retry."
|
msgid "Your password is not valid. Please refresh the page to retry."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: themes/default/templates/partial/render.js.ep:13
|
#: themes/default/templates/partial/render.js.ep:14
|
||||||
msgid "Zip content:"
|
msgid "Zip content:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:20
|
#: themes/default/templates/delays.html.ep:24
|
||||||
msgid "between %1 and %2, the file will be kept %3 day(s)."
|
msgid "between %1 and %2, the file will be kept %3 day(s)."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:22
|
#: themes/default/templates/delays.html.ep:26
|
||||||
msgid "between %1 and %2, the file will be kept forever."
|
msgid "between %1 and %2, the file will be kept forever."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -796,12 +800,12 @@ msgid "expires on XXX"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:26
|
#: themes/default/templates/delays.html.ep:30
|
||||||
msgid "for %1 and more, the file will be kept %2 day(s)"
|
msgid "for %1 and more, the file will be kept %2 day(s)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. (format_bytes($keys[$i])
|
#. (format_bytes($keys[$i])
|
||||||
#: themes/default/templates/delays.html.ep:28
|
#: themes/default/templates/delays.html.ep:32
|
||||||
msgid "for %1 and more, the file will be kept forever."
|
msgid "for %1 and more, the file will be kept forever."
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,7 @@ function addAlert(msg) {
|
||||||
|
|
||||||
// Spawn WebSocket
|
// Spawn WebSocket
|
||||||
function spawnWebsocket(pa) {
|
function spawnWebsocket(pa) {
|
||||||
|
console.log('Spawning websocket…');
|
||||||
var ws = new WebSocket(ws_url);
|
var ws = new WebSocket(ws_url);
|
||||||
ws.onopen = function() {
|
ws.onopen = function() {
|
||||||
console.log('Connection is established!');
|
console.log('Connection is established!');
|
||||||
|
@ -62,8 +63,13 @@ function spawnWebsocket(pa) {
|
||||||
ws.onclose = function() {
|
ws.onclose = function() {
|
||||||
console.log('Connection is closed');
|
console.log('Connection is closed');
|
||||||
if (!window.completed) {
|
if (!window.completed) {
|
||||||
console.log('Connection closed. Retrying to get slice '+pa);
|
window.attempts++;
|
||||||
window.ws = spawnWebsocket(pa);
|
if (window.attempts < 10) {
|
||||||
|
console.log('Connection closed. Retrying to get slice '+pa);
|
||||||
|
window.ws = spawnWebsocket(pa);
|
||||||
|
} else {
|
||||||
|
alert(i18n.tooMuchAttempts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ws.onmessage = function(e) {
|
ws.onmessage = function(e) {
|
||||||
|
@ -71,6 +77,9 @@ function spawnWebsocket(pa) {
|
||||||
var json = res.shift();
|
var json = res.shift();
|
||||||
var data = JSON.parse(json);
|
var data = JSON.parse(json);
|
||||||
|
|
||||||
|
// Reset counter since we succeded to open a websocket and got a message
|
||||||
|
window.attempts = 0;
|
||||||
|
|
||||||
if (data.msg !== undefined) {
|
if (data.msg !== undefined) {
|
||||||
addAlert(data.msg);
|
addAlert(data.msg);
|
||||||
console.log(data.msg);
|
console.log(data.msg);
|
||||||
|
@ -78,6 +87,7 @@ function spawnWebsocket(pa) {
|
||||||
$('.file-abort').addClass('hide');
|
$('.file-abort').addClass('hide');
|
||||||
}
|
}
|
||||||
window.onbeforeunload = null;
|
window.onbeforeunload = null;
|
||||||
|
window.attempts = 10;
|
||||||
} else {
|
} else {
|
||||||
console.log('Getting slice '+(data.part + 1)+' of '+data.total);
|
console.log('Getting slice '+(data.part + 1)+' of '+data.total);
|
||||||
var slice = JSON.parse(res.shift());
|
var slice = JSON.parse(res.shift());
|
||||||
|
@ -203,8 +213,13 @@ function spawnWebsocket(pa) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ws.onerror = function() {
|
ws.onerror = function() {
|
||||||
console.log('Error. Retrying to get slice '+pa);
|
window.attempts++;
|
||||||
window.ws = spawnWebsocket(pa);
|
if (window.attempts < 10) {
|
||||||
|
console.log('Error. Retrying to get slice '+pa);
|
||||||
|
window.ws = spawnWebsocket(pa);
|
||||||
|
} else {
|
||||||
|
alert(i18n.tooMuchAttempts);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ws;
|
return ws;
|
||||||
}
|
}
|
||||||
|
@ -225,6 +240,7 @@ $(document).ready(function(){
|
||||||
window.a = new Array();
|
window.a = new Array();
|
||||||
window.key = pageKey();
|
window.key = pageKey();
|
||||||
window.completed = false;
|
window.completed = false;
|
||||||
|
window.attempts = 0;
|
||||||
|
|
||||||
if (key !== '=') {
|
if (key !== '=') {
|
||||||
var go = true;
|
var go = true;
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
% # vim:set sts=4 sw=4 ts=4 ft=javascript expandtab:
|
% # vim:set sts=4 sw=4 ts=4 ft=javascript expandtab:
|
||||||
var ws_url = '<%= url_for('download')->to_abs().stash('file') %>';
|
var ws_url = '<%= url_for('download')->to_abs().stash('file') %>';
|
||||||
var i18n = {
|
var i18n = {
|
||||||
aborted1: '<%= l('Download aborted.') %>',
|
aborted1: '<%= l('Download aborted.') %>',
|
||||||
aborted2: '<%= l('Click here to refresh the page and restart the download.') %>',
|
aborted2: '<%= l('Click here to refresh the page and restart the download.') %>',
|
||||||
badkey: '<%= l('It seems that the key in your URL is incorrect. Please, verify your URL.') %>',
|
badkey: '<%= l('It seems that the key in your URL is incorrect. Please, verify your URL.') %>',
|
||||||
confirmExit: '<%= l('You have attempted to leave this page. The download will be canceled. Are you sure?') %>',
|
confirmExit: '<%= l('You have attempted to leave this page. The download will be canceled. Are you sure?') %>',
|
||||||
download: '<%= l('Get the file') %>',
|
download: '<%= l('Get the file') %>',
|
||||||
fileDownloaded: '<%= l('File downloaded') %>',
|
fileDownloaded: '<%= l('File downloaded') %>',
|
||||||
loading: '<%= l('Asking for file part XX1 of %1', stash('nbslices')) %>',
|
loading: '<%= l('Asking for file part XX1 of %1', stash('nbslices')) %>',
|
||||||
nokey: '<%= l('You don\'t seem to have a key in your URL. You won\'t be able to decrypt the file. Download canceled.') %>',
|
nokey: '<%= l('You don\'t seem to have a key in your URL. You won\'t be able to decrypt the file. Download canceled.') %>',
|
||||||
showZipContent: '<%= l('Show zip content') %>',
|
showZipContent: '<%= l('Show zip content') %>',
|
||||||
zipContent: '<%= l('Zip content:') %>'
|
tooMuchAttempts: '<%= l('Unable to download the file: too much unsuccessful attempts to open a websocket. Please, contact the administrator.') %>',
|
||||||
|
zipContent: '<%= l('Zip content:') %>'
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue