Open Vrudin opened 7 years ago
Before closing this issue we need to implement a sie check of the file. If the file is larger than 20 MB, do not allow upload.
Do we need to check free disk space before collecting uploaded file? Will the db display errors to the user if it is attempted to upload file when not enough disk space? Note: Ask TA
edit: For header-check: $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $file);
if ($mime != "application/pdf"){ $this->validationErrors[] = "Sorry, only PDF files are allowed."; }
kommenterer så noen mer php/github kompetente kan få det inn i applikasjonen: i startUpload() trenger vi while/if (file_exists($targetFile)) {endre fil-navn}