How can you get the MIME type of an uploaded file?
Group of answer choices
$file->getMimeType();
$file->getType();
$file->getFileType();
$file->getMIME();
$file->getMimeType();
What method is used to retrieve a file from a form submission in CodeIgniter 4?
Group of answer choices
$this->request->getFile(‘userfile’);
$this->input->file(‘userfile’);
$this->upload->getFile(‘userfile’);
$this->file->get(‘userfile’);
$this->request->getFile(‘userfile’);
Which method is used to get the size of an uploaded file?
Group of answer choices
$file->getSize();
$file->getSizeInBytes();
$file->getFileSize();
$file->size();
$file->getSize();
What is the default upload directory in CodeIgniter 4?
Group of answer choices
writable/uploads/
assets/uploads/
files/
public/uploads/
writable/uploads/
How can you retrieve all uploaded files in a single request?
Group of answer choices
$this->request->getFiles();
$this->request->getAllFiles();
$this->input->getFiles();
$this->request->files();
$this->request->getFiles();
How do you rotate an image in CodeIgniter 4?
Group of answer choices
rotate()
spin()
turn()
flip()
rotate()
Which of the following methods is used to crop an image?
Group of answer choices
crop()
cut()
trim()
slice()
crop()
Which method is used to save the manipulated image to a file?
Group of answer choices
save()
store()
write()
export()
save()
What is the default driver used by CodeIgniter 4 for image manipulation?
Group of answer choices
GD2
GD
ImageMagick
Imagick
GD2
How do you specify the quality of an image when saving it in CodeIgniter 4?
Group of answer choices
save(‘path/to/file’, 85)
setQuality(85)
quality(85)
setCompression(85)
save(‘path/to/file’, 85)
What does the isValid() method return if the file is successfully uploaded?
Group of answer choices
True
False
Null
An error message
True
How can you restrict the file types allowed for upload?
Group of answer choices
Using $this->validate([‘userfile’ => ‘uploaded[userfile]|mime_in[userfile,image/jpg,image/jpeg]’]);
Using $file->setAllowedTypes()
Using $file->restrictTypes()
Using $file->filterTypes()
Using $this->validate([‘userfile’ => ‘uploaded[userfile]|mime_in[userfile,image/jpg,image/jpeg]’]);
Which method is used to open an image for manipulation?
Group of answer choices
withFile(‘path/to/image’)
loadImage(‘path/to/image’)
openImage(‘path/to/image’)
getImage(‘path/to/image’)
withFile(‘pate/to/image’)
What method is used to resize an image in CodeIgniter 4?
Group of answer choices
resize()
scale()
changeSize()
alterSize()
resize()
How do you maintain the aspect ratio when resizing an image in CodeIgniter 4?
Group of answer choices
It maintains aspect ratio by default
Use ratioResize()
Set keepAspectRatio to true
maintainRatio()
It maintains aspect ratio by default