563 Commits

Author SHA1 Message Date
Jerome Jutteau
b0d7e17277 [TASK] Disabling file deduplication by default.
File hashing is a pretty intensive task both for CPU and disk.
This feature seems not to be a must have and can produce unwanted side effects.
Very large file can take a lot of time to be hashed at the end of transfert, producing protential timeouts and user frustration.

Users can still enable file deduplication feature by setting `file_hash` to `md5`.

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-05 13:46:16 +02:00
Jerome Jutteau
b8d29136e6 [BUGFIX] retry transfering with lower size for any HTTP error code
When a timeout is too low compared to sent size, server will return a 500 error.
Jirafeau retry to send again but do not try to reduce chunk size.

This patch will make Jiarfeau split in half it's sent size each an error occurs.

ref #273

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-05 08:25:32 +02:00
Jerome Jutteau
0b8bc44d7a [BUGFIX] jirafeau_ini_to_bytes with no modifier
When setting a PHP ini value like `post_max_size`,
the value may not have a modifier (e.g. "M") and
for "0" input, the function return empty string.

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-05 00:33:43 +02:00
Jerome Jutteau
1581d41cc2 [BUGFIX] Manage PHP configuration with "unlimited" upload
Setting `post_max_size` and `upload_max_filesize` PHP options to "0" is unmanaged by Jirafeau.
It tries to send 0 bytes and Javascript have some zero division errors.

This commit will use $max_upload_chunk_size_bytes option when available.
If $max_upload_chunk_size_bytes is also set to zero, chunk size is set an arbitrary value of 10M.

Non html-5 users will not have size limitation shown.

fixes #272

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-04 23:44:41 +02:00
Jerome Jutteau
ac13b92b26 [FEATURE] Support light/dark mode
A new option `dark_style` is introduced to set which dark theme administrators want to user.
If administrator don"t want to use a dark mode, they can just set `dark_syle` and `style` option to the same value.

closes #305

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-04 09:42:55 +02:00
Jerome Jutteau
48fd211cd2 [BUGFIX] fix proposed web root during installation
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-03 17:17:32 +02:00
Jerome Jutteau
1294029019 [BUGFIX] Print nice error when install.php is missing and we need it.
Also show header when printing this type of fatal error

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-03 17:15:17 +02:00
Jerome Jutteau
6eca3aa915 [BUGFIX] Limit upload chunk size to a reasonable value
Not really a bug but avoid users to fall in php configuration traps.
ref #303

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-03 15:33:55 +02:00
Jerome Jutteau
6f6cfb13fc Add more details about upload error
ref #303

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-03 10:54:01 +02:00
Jerome Jutteau
9493cba088 Detail more errors
A user which just have "Error" is hard to help.
This should help understanding what is happening.

ref #303

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-07-02 16:39:30 +02:00
Jerome Jutteau
8d598fa5dd [TASK] Add example of admin password generation
ref #297

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-05-17 18:34:39 +02:00
Hunter Fuller
d00ef4f1b8 Add support for the X-Sendfile header/module to offload downloads.
With the appropriate config option enabled, Jirafeau will send the
X-Sendfile header instead of sending the file itself. As a result,
Apache/lighttpd will send the file without the intervention of Jirafeau,
and download resumes/seeking will also be enabled for this download.

If the user requested an encrypted file then this will not work, but it
should work in all other cases.
2022-04-30 19:25:40 +00:00
Jerome Jutteau
5058cbd048 Jirafeau version 4.4.0
closes #292

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2022-04-30 20:54:22 +02:00
Oskar Fagerfjäll
3e84a5debe fix spelling mistakes 2022-04-07 07:32:53 +00:00
Edwin Bos
c7f776c8b9 Implement expiry after a fortnight (2 weeks). 2022-04-07 07:30:17 +00:00
MrWouterNL
6d6c111b80
[BUGFIX] Disallow file preview for image/svg+xml files 2022-03-21 20:46:14 +01:00
Jerome Jutteau
03f216f58d [BUGFIX] fix file previewing
- avoid previewing text/*
- javascript side more clear

closes #264

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2021-05-18 09:58:16 +02:00
Nicky Galliano
2bc76d8bae Update functions.php.
Following the update to php 8, I got the following debug error when trying to access my instance :
"Array and string offset access syntax with curly braces is no longer supported in [...]/jirafeau/lib/functions.php on line 31"
I just changed the deprecated curly braces into brackets and I was good to go.
2021-02-15 13:15:34 +00:00
Jerome Jutteau
33bb6cfe31 [TASK] add more information in bug report
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2021-01-03 22:38:49 +01:00
Jerome Jutteau
420be1d8b3 [FEATURE] add basic docker options
- web_root
- var_root
- admin_password

ref #247

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2021-01-01 21:38:07 +01:00
Jerome Jutteau
9a51f6fc76 [FEATURE] provide details for bug opening
refs #235

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2021-01-01 02:31:34 +01:00
Jerome Jutteau
cd86d83c47 Jirafeau version 4.3.0
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-30 11:11:41 +01:00
Jerome Jutteau
beae768cc7 [FEATURE] allow admin to not log users IP in Jirafeau
New option 'store_uploader_ip' set to true by default.

closes #248

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-30 10:32:04 +01:00
Jerome Jutteau
df31fed41e [TASK] clean install.php functions
Move functions to lib/functions.php

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-13 22:23:15 +01:00
Jerome Jutteau
32842e276e [BUGFIX] Add specific handle for XHR error
Avoid aborting on this type of error, better wait for state change.
Still log "error" and "abort" events.

ref #212

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-13 19:59:29 +01:00
Jerome Jutteau
b6f423726c [TASK] run php-cs-fixer
php-cs-fixer fix --rules=@PSR2 .

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-05 13:45:04 +01:00
Jerome Jutteau
a20a3a2f4c [BUGFIX] lower POST size when ̀PHP's upload_max_filesize is too low.
When post_max_size == upload_max_filesize, Jifeau sends too large request (files + headers) and serveur still returns 200.
Jirafeau does not see any files and return Error 23.
Javascript client now detect this error and retry with a lower file size to make room for headers.

closes #240

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-05 12:56:27 +01:00
Jerome Jutteau
d598ed64ed [TASK] centralize error reporting config
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-05 11:53:40 +01:00
Jerome Jutteau
a916c325ea Jirafeau version 4.2.0
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-12-02 20:30:37 +01:00
Sebastien Mennetrier
bbc89b1f7e Remove unnecessary 'Term of Service' from locales 2020-11-27 11:20:15 +01:00
Jerome Jutteau
29fffe4a12 [BUGFIX] fix broken admin file listing
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-11-20 12:59:56 +01:00
Jerome Jutteau
2f02bc687a [TASK] reword file_hash option
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-11-20 12:38:24 +01:00
Jerome Jutteau
1203cc4e90 [BUGFIX] avoid php warning because async file does not exist yet
Each time an async file is pushed, its size is check in order to not get over a maximal_upload_size option.
On the first push, the destination file does not exist and this generates a warning.

closes #238

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-11-19 22:34:59 +01:00
Jerome Jutteau
092766a374 [BUGFIX] fix error return
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-11-19 22:15:07 +01:00
Jerome Jutteau
9d77c0fe90 [BUGFIX] disable php error reporting by default
wrong permission configuration migth trigger error or warning message leaking location of var-folder.

ref #238

Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
2020-11-19 21:51:58 +01:00
J. Lavoie
0b9b3765e5 Translated using Weblate (German)
Currently translated at 100.0% (116 of 116 strings)
2020-11-16 00:21:37 +01:00
Tymofij Lytvynenko
27483cab01 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (116 of 116 strings)
2020-11-16 00:21:37 +01:00
J. Lavoie
f68fb350ac Translated using Weblate (Italian)
Currently translated at 99.1% (115 of 116 strings)
2020-11-16 00:21:37 +01:00
J. Lavoie
c76b681251 Translated using Weblate (French)
Currently translated at 100.0% (116 of 116 strings)
2020-11-16 00:21:37 +01:00
Yaron Shahrabani
01f1c52390 Translated using Weblate (Hebrew)
Currently translated at 99.1% (115 of 116 strings)
2020-11-16 00:21:37 +01:00
Yaron Shahrabani
f1844c44ad Translated using Weblate (Hebrew)
Currently translated at 82.7% (96 of 116 strings)
2020-11-16 00:21:37 +01:00
Srikanth L
14d3c112ee Translated using Weblate (Tamil)
Currently translated at 18.1% (21 of 116 strings)
2020-11-16 00:21:37 +01:00
ssantos
f7030e1706 Translated using Weblate (Portuguese)
Currently translated at 100.0% (116 of 116 strings)
2020-11-16 00:21:37 +01:00
Yaron Shahrabani
8e461b63d0 Translated using Weblate (Hebrew)
Currently translated at 73.2% (85 of 116 strings)
2020-11-16 00:21:37 +01:00
ssantos
803001cfaa Translated using Weblate (Portuguese)
Currently translated at 100.0% (116 of 116 strings)
2020-11-16 00:21:37 +01:00
ssantos
ff976198f0 Translated using Weblate (Portuguese)
Currently translated at 97.4% (113 of 116 strings)
2020-11-16 00:21:37 +01:00
Luna Jernberg
965f64e458 Translated using Weblate (Swedish)
Currently translated at 100.0% (116 of 116 strings)
2020-11-16 00:21:37 +01:00
Luna Jernberg
2386eafc67 Translated using Weblate (Swedish)
Currently translated at 99.1% (115 of 116 strings)
2020-11-16 00:21:37 +01:00
ssantos
cdfb87e6da Translated using Weblate (Portuguese)
Currently translated at 94.8% (110 of 116 strings)
2020-11-16 00:21:37 +01:00
Oğuz Ersen
3cb22e21af Translated using Weblate (Turkish)
Currently translated at 100.0% (116 of 116 strings)
2020-11-16 00:21:37 +01:00