Media Type File - NCIOCPL/cgov-digital-platform GitHub Wiki
- Our current nciFile has dates + date display mode, but the date doesn't display on the front-end... doesn't it make sense to remove Date Display Mode? Date display mode would be used if the file is placed in a list which has a template that displays the date. We should keep this.
- See File Size further down the page – how does this work? It currently doesn't display on the form field. Displays when files are added to Related Resources or lists.
- File Extension (item_file_attachment_ext) - automatically is added to the form after user uploads file. Is this necessary?
- Display Name: File
- Machine-readable Name: cgov_file
Used to upload all downloadable file types, such as PDFs, Excel spreadsheets, and Word docs.
All file types are permitted to be uploaded.
The maximum file size is 250MB.
-
Name - Tooltip for this field should be: This is the name of the file, to be displayed in the system.
-
- Date display rules - when more than one date is selected in Date Display Mode - use the most recent of the dates selected. Display the label of that date, and that date. If only one is selected, show the label and the date. If nothing is selected, no date displays.
- Field Name: field_file_attachment
- Label: File
- Type: file upload
- Required: Yes
- Max Characters: N/A
- Tooltip Text: Browse to the file on your computer that you want to upload into Drupal.
- Translatable: Yes
Once a user uploads/saves a file into the system, this field should populate with the filename of the attached file. This field should not be editable.
- Field Name: field_file_attachment_filename
- Label: Uploaded Filename
- Type: text (plain)
- Required:
- Max Characters: N/A
- Translatable: Yes
Once a user uploads/saves a file into the system, this field should populate with the type of file that was uploaded to the field_file_attachment. This field should not be editable.
- Field Name: field_file_attachment_type
- Label: File Type
- Type: text (plain)
- Required:
- Tooltip Text: Automatically appears once you upload the file.
- Max Characters: N/A
- Translatable: Yes
- Field Name: field_file_attachment_size
- Label: File Size
- Type:
- Required:
- Tooltip Text:
- Max Characters: N/A
- Translatable:
- For each file added to a list, the following should be displayed"
- an icon based on the file type. Files that will have icons are:
- MS Word (.doc and .docx)
- MS Excel (.xls and .xlsx)
- MS Powerpoint (.ppt and .pptx)
- mobi
- epub
- exe
- txt
- the file size
- Display the file size for all file content types, rounded to the nearest integer.
- an icon based on the file type. Files that will have icons are:
- if no icon is available, then show the file type extension
- Example of what should display: File Title (.filetype) (5.3 MB)
- If file type is HTML:
- Do not show file file type extension
- Do not display the file size
- Related Resources with files:
- Language Dropdown
- Site Sections
- Pretty URL
- Name
- Short Title
- Card Title
- List Description
- Feature Card Description
- Promotional Image
- Posted Date
- Updated Date
- Reviewed Date
- Date Display Mode
- Search Engine Restrictions