G4.47 Data File Validator
reynoldtan opened this issue · 1 comments
reynoldtan commented
Branch
g4.47-Data-file-validator
Groups
Group 4 - API | Services | Plugins
Describe
Create a validator plugin that validates Data File for
- Is not empty/0 file id.
- Has Drupal File Id assigned/created.
- File Id can loaded using Drupal file system API.
- A valid TSV or TXT file extension and file MIME type.
- File size is greater than 0.
- File can be opened/read.
Design
Similar to other validator plugin, this method will implement validator plugin with the following method().
public function validate() {
Check file id is > 0
Load file id
Check if file can be loaded through Drupal File API
Use MIME information of the file to validate file type.
Use the File size information to validate file size is > 0
Open/Read File
Check if file can be opened/read
}
laceysanderson commented
Completed with above merged PR