Updating gif + some minor validations BT#2784

skala
Julio Montoya 15 years ago
parent 9f8dbf8eeb
commit 56988cb3fe
  1. 3
      main/inc/lib/document.lib.php
  2. 3
      main/inc/lib/fileUpload.lib.php
  3. BIN
      main/inc/lib/javascript/jquery-upload/pbar-ani.gif

@ -1830,9 +1830,11 @@ class DocumentManager {
if (isset($files['file'])) {
$upload_ok = process_uploaded_file($files['file']);
if ($upload_ok) {
// File got on the server without problems, now process it
$new_path = handle_uploaded_document($course_info, $files['file'], $base_work_dir, $path, api_get_user_id(), api_get_group_id(), null, $max_filled_space, $unzip, $if_exists, $show_output);
if ($new_path) {
$new_comment = isset($title) ? trim($comment) : '';
$new_title = isset($title) ? trim($title) : '';
@ -2010,6 +2012,7 @@ class DocumentManager {
}
}
}
}
return false;
}

@ -137,9 +137,10 @@ function handle_uploaded_document($_course, $uploaded_file, $base_work_dir, $upl
// Add extension to files without one (if possible)
$uploaded_file['name'] = add_ext_on_mime($uploaded_file['name'], $uploaded_file['type']);
$current_session_id = api_get_session_id();
// Check if there is enough space to save the file
if (!enough_space($uploaded_file['size'], $maxFilledSpace)) {
if ($output){
if ($output) {
Display::display_error_message(get_lang('UplNotEnoughSpace'));
}
return false;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Loading…
Cancel
Save