# 7.1. Files, images and video¶

These artefacts are internal Mahara ones to display:

• folders that contain files
• show images
• embed audio and video files

If you are on a mobile device and select to upload a file, you can take a photo or make a video or audio recording (Android only for audio) directly.

## 7.1.1. Embedded media¶

Display an embedded video or audio file from your uploaded files. Mahara comes with the Video.js media player that allows for the display of a number of file formats without having another player installed on the device.

Note

The site administrator must allow media formats. Some of them can be displayed directly within Mahara while others need additional software installed on a device. See the list of allowed media formats.

Videos placed onto a page in this block scale to the width of their column. They also scale automatically when your browser space gets smaller.

1. Block title: Choose a title for your block.

2. Files area: Choose from which files area you would like to select a media file:

• My files: You see all the folders and files that you have created.
• Group files: You see all the folders and files that you are allowed to publish.
• Institution files: If you are an institution administrator, you will see institution folders and files.
• Site files: If you are a site administrator, you will see all site folders and files. Otherwise, you can only see the ones that are in the folder public in the Site files.

• Licensor: If you are uploading a file that somebody else created, you can attribute the work to them here and provide their name for example.
• Original URL: If you are uploading somebody else’s file, provide a link to the original Internet address so that others can go there and view the original file.
4. File: You do not have to go back to your Files area in Content in order to upload a file. You can do so directly from this screen.

5. Folder path: The breadcrumbs show in which folder you are currently.

6. Click the Edit button to change any component of a folder or file, i.e. its name, description and tags. If you have a folder or file included in a page that you submitted for feedback, you will not be able to edit them.

Note

You can also still select files that have been submitted in another portfolio page.

7. Click into the row that contains the file you wish to display in the block to select it or click the Select button .

Warning

When you place group, institution or site files into a page, beware that these files may not be available at some point anymore when the person in charge deletes them.

8. Click Remove if you want to revert your selection.

9. Retractable: Choose whether you want to allow users to reduce the block to its heading on a page or see just the heading only automatically. The options are:

• No: The block and its content is displayed at all times.
• Yes: Allow users to reduce the block to just the heading by clicking the Retractable icon .
• Automatically retract: Only the heading of the block is visible, and the user can click the Retracted icon to view its content.
10. Click the Save button to accept your changes, or click Cancel to leave the block’s content as it is. Remove is shown only when you place the block into the page for the first time.

11. You can also click the Close button in the top left-hand corner of the modal window to either remove a newly created block before it is being saved or to cancel any changes and leave the block’s content as it is.

Note

Only the files that you are allowed to embed are displayed. If you uploaded a mp4 file but it does not show here, you may have to check if it has the correct codec. Only H.264 mp4 files can be embedded.

iOS devices can even be trickier as these devices may only recognize the MPEG4 “Baseline” profile rather than the “High” profile. You can read the Apple specifications and convert a video if needed using Handbrake. Newer iOS devices (from the iPhone 5S on) should play “High” profile videos.

1. Block title: Choose a title for your files block.

2. Files area: Choose from which files area you would like to select a file:

• My files: You see all the folders and files that you have created.
• Group files: You see all the folders and files that you are allowed to publish.
• Institution files: If you are an institution administrator, you will see institution folders and files.
• Site files: If you are a site administrator, you will see all site folders and files. Otherwise, you can only see the ones that are in the folder public in the Site files.

• Licensor: If you are uploading a file that somebody else created, you can attribute the work to them here and provide their name for example.
• Original URL: If you are uploading somebody else’s file, provide a link to the original Internet address so that others can go there and view the original file.
4. If the site administrator turned on the image resizing option, you can decide whether you want to have your images resized if they are larger than the specified dimensions. This option is recommended to save space in your portfolio.

5. File: You do not have to go back to your Files area in Content in order to upload a file. You can do so directly from this screen.

6. Folder path: The breadcrumbs show in which folder you are currently.

7. Click the Edit button to change any component of a folder or file, i.e. its name, description and tags. If you have a folder or file included in a page that you submitted for feedback, you will not be able to edit them.

Note

You can also still select files that have been submitted in another portfolio page.

8. Click into the row that contains the file you wish to display in the block to select it or click the Select button .

Warning

When you place group, institution or site files into a page, beware that these files may not be available at some point anymore when the person in charge deletes them.

9. Click Remove if you want to revert your selection.

10. Retractable: Choose whether you want to allow users to reduce the block to its heading on a page or see just the heading only automatically. The options are:

• No: The block and its content is displayed at all times.
• Yes: Allow users to reduce the block to just the heading by clicking the Retractable icon .
• Automatically retract: Only the heading of the block is visible, and the user can click the Retracted icon to view its content.
11. Click the Save button to accept your changes, or click Cancel to leave the block’s content as it is. Remove is shown only when you place the block into the page for the first time.

12. You can also click the Close button in the top left-hand corner of the modal window to either remove a newly created block before it is being saved or to cancel any changes and leave the block’s content as it is.

Note

You cannot re-order files once you have selected them. You would need to remove them and select them again in the correct order.

• file name
• file description
• size
• a link to more details
1. View information about the file:
• file name
• file description
• size
2. Click the file name to be taken to the details page for this file.

When you click the file name, you are taken to the details page for that particular file and see some more metadata.

1. The name of the file is displayed.
2. The title of the page in which the artefact appears is linked.
3. The author of the page is displayed and a link to the profile page provided.
6. If the owner of the file allowed comments, you can comment directly on the file.
7. Click the button with the three dots to reach lesser used functionality:

## 7.1.3. Folder¶

Select a folder to display all files within it as links on your page.

1. Block title: If you do not set a title, the name of the folder that you choose to display will be used.

2. Files area: Choose from which files area you would like to select a folder:

• My files: You see all the folders and files that you have created.
• Group files: You see all the folders and files that you are allowed to publish.
• Institution files: If you are an institution administrator, you will see institution folders and files.
• Site files: If you are a site administrator, you will see all site folders and files. Otherwise, you can only see the ones that are in the folder public in the Site files.
3. Folder path: The breadcrumbs show in which folder you are currently.

4. Click the Expand icon if you want to reach a sub folder.

5. You can edit any component of the folder, i.e. its name, description and tags by clicking the Edit button .

6. Click into the row that contains the folder you wish to display in the block to select it or click the Select button .

Note

You can also still select folders that have been submitted in another portfolio page.

7. Click Remove if you wish to revert your choice.

8. Sort order of files: Decide on the sort order of files in the block when they are displayed on the page. You can choose between:

• Ascending
• Descending

Site administrators decide on the default sort order of content within folder in the Blocktype: File / folder settings.

10. Retractable: Choose whether you want to allow users to reduce the block to its heading on a page or see just the heading only automatically. The options are:

• No: The block and its content is displayed at all times.
• Yes: Allow users to reduce the block to just the heading by clicking the Retractable icon .
• Automatically retract: Only the heading of the block is visible, and the user can click the Retracted icon to view its content.
11. Click the Save button to accept your changes, or click Cancel to leave the block’s content as it is. Remove is shown only when you place the block into the page for the first time.

12. You can also click the Close button in the top left-hand corner of the modal window to either remove a newly created block before it is being saved or to cancel any changes and leave the block’s content as it is.

Warning

When you place a folder with group, institution or site files into a page, beware that these files may not be available at some point anymore when the person in charge deletes them.

You can see information about the folder as well as the files contained within it when the block is placed on a page.

1. Block title.
2. Click the file name to be taken to the details page for this file.
5. Click the Details link Details to be taken to the details page for the block.

On the details page for the Folder block you see the following.

1. Block title.
2. The title of the page in which the block appears is linked.
3. The author of the page is displayed and a link to the profile page provided.
4. Click the file name to be taken to the details page for this file.
7. Click the button with the three dots to reach lesser used functionality:

When you clicked on a file, you are taken to that file’s details page. You always see which folder contains the file.

## 7.1.4. Image¶

Display a single image in a block.

Note

In a default Mahara instance, this block is available in the content chooser at the top together with the simple Text block. It does not appear in the section Media as well.

1. Block title: Choose a title for your block.

2. Files area: Choose from which files area you would like to select an image:

• My files: You see all the folders and files that you have created.
• Group files: You see all the folders and files that you are allowed to publish.
• Institution files: If you are an institution administrator, you will see institution folders and files.
• Site files: If you are a site administrator, you will see all site folders and files. Otherwise, you can only see the ones that are in the folder public in the Site files.

• Licensor: If you are uploading a file that somebody else created, you can attribute the work to them here and provide their name for example.
• Original URL: If you are uploading somebody else’s file, provide a link to the original Internet address so that others can go there and view the original file.
4. If the site administrator turned on the image resizing option, you can decide whether you want to have your images resized if they are larger than the specified dimensions. This option is recommended to save space in your portfolio.

5. File: You do not have to go back to your Files area in Content in order to upload a file. You can do so directly from this screen.

6. Folder path: The breadcrumbs show in which folder you are currently.

7. Click into the row that contains the file you wish to display in the block to select it or click the Select button . You only see image files that you are allowed to use in the block.

Warning

When you place group, institution or site files into a page, beware that these files may not be available at some point anymore when the person in charge deletes them.

8. Click the Edit button to change any component of a folder or file, i.e. its name, description and tags. If you have a folder or file included in a page that you submitted for feedback, you will not be able to edit them.

Note

You can also still select files that have been submitted in another portfolio page.

9. Click Remove if you want to revert your selection.

10. Show description: Set the switch to “Yes” if you wish to display the description of your photo. It could contain the source of it for example.

11. Width: Choose the width (in pixels) for your image. If you do not provide a number, the image will be scaled to the width of the block.

12. Retractable: Choose whether you want to allow users to reduce the block to its heading on a page or see just the heading only automatically. The options are:

• No: The block and its content is displayed at all times.
• Yes: Allow users to reduce the block to just the heading by clicking the Retractable icon .
• Automatically retract: Only the heading of the block is visible, and the user can click the Retracted icon to view its content.
13. Click the Save button to accept your changes, or click Cancel to leave the block’s content as it is. Remove is shown only when you place the block into the page for the first time.

14. You can also click the Close button in the top left-hand corner of the modal window to either remove a newly created block before it is being saved or to cancel any changes and leave the block’s content as it is.

## 7.1.6. PDF¶

Embed PDFs into a page.

1. Block title: Choose a title for your PDF block.

2. Files area: Choose from which files area you would like to select a file:

• My files: You see all the folders and files that you have created.
• Group files: You see all the folders and files that you are allowed to publish.
• Institution files: If you are an institution administrator, you will see institution folders and files.
• Site files: If you are a site administrator, you will see all site folders and files. Otherwise, you can only see the ones that are in the folder public in the Site files.

• Licensor: If you are uploading a file that somebody else created, you can attribute the work to them here and provide their name for example.
• Original URL: If you are uploading somebody else’s file, provide a link to the original Internet address so that others can go there and view the original file.
4. File: You do not have to go back to your Files area in Content in order to upload a file. You can do so directly from this screen.

5. Folder path: The breadcrumbs show in which folder you are currently.

6. Click the Expand icon if you want to reach a sub folder.

7. Click the Edit button to change any component of a folder or file, i.e. its name, description and tags. If you have a folder or file included in a page that you submitted for feedback, you will not be able to edit them.

Note

You can also still select files that have been submitted in another portfolio page.

8. Click into the row that contains the file you wish to display in the block to select it. You only see PDF files.

Warning

When you place group, institution or site files into a page, beware that these files may not be available at some point anymore when the person in charge deletes them.

9. Click Remove if you want to revert your selection.

10. Retractable: Choose whether you want to allow users to reduce the block to its heading on a page or see just the heading only automatically. The options are:

• No: The block and its content is displayed at all times.
• Yes: Allow users to reduce the block to just the heading by clicking the Retractable icon .
• Automatically retract: Only the heading of the block is visible, and the user can click the Retracted icon to view its content.
11. Click the Save button to accept your changes, or click Cancel to leave the block’s content as it is. Remove is shown only when you place the block into the page for the first time.

12. You can also click the Close button in the top left-hand corner of the modal window to either remove a newly created block before it is being saved or to cancel any changes and leave the block’s content as it is.

Once the PDF is embedded on a page, you can scroll through it and also download it for example. The PDF is displayed in its best possible fit to show one page completely.

1. Title of the block.
2. Toggle to the sidebar where you can jump from one page to another either in the thumbnail or document outline view.
3. Click the Search icon to search within the document.
4. You can move to the previous or next page using the Arrow icons.
5. The number of the current page is displayed. You can put a different number in and hit the Enter or Tab key and jump to that directly.
6. The total number of pages is shown.
7. Decrease the page size by clicking the Minus, or increase the page size by clicking the Plus. The block size does not increase.
8. Use the Automatic zoom drop-down menu to choose a different zoom size instead of using the Plus and Minus buttons.
9. Click the Print icon to print the PDF.
11. Click the Tools icon to see more options available for this PDF.
12. Use the scrollbar to move through the document.
13. Click the Details link Details to be taken to the details page for the block.

If you have trouble embedding a PDF file, you might have come across an issue that others have also experienced. The mimetype of the PDF may not be recognized correctly. The correct “mimetype” is “pdf”, but programmes can circumvent using this mimetype for PDFs to ensure that their file is downloaded instead of viewed in the browser for example. There is not an easy fix to this issue, and the discussion of possible solutions has started.

In the meantime, you can delete the incorrect mimetypes from your browser and ensure that only “PDF” is left.

Follow these steps to delete the incorrect mimetypes:

1. Close Firefox.
3. Open the mimeTypes.rdf file in a text editor.
4. Search for pdf.
5. Leave only the entry that is application/pdf.
6. Delete all other PDF references by deleting everything for that entry from <RDF:Description ...> to </RDF:Description>.
7. Open Firefox and go to Preferences → Applications.
8. Search for pdf. You should now only see one entry that reads “Portable Document Format (PDF)”.

## 7.1.7. Some HTML¶

Display the content of an HTML file in a page.

1. Block title: Choose a title for your block.

2. Files area: Choose from which files area you would like to select an HTML file:

• My files: You see all the folders and files that you have created.
• Group files: You see all the folders and files that you are allowed to publish.
• Institution files: If you are an institution administrator, you will see institution folders and files.
• Site files: If you are a site administrator, you will see all site folders and files. Otherwise, you can only see the ones that are in the folder public in the Site files.

• Licensor: If you are uploading a file that somebody else created, you can attribute the work to them here and provide their name for example.
• Original URL: If you are uploading somebody else’s file, provide a link to the original Internet address so that others can go there and view the original file.
4. Upload file: You do not have to go back to your Files area in Content in order to upload a file. You can do so directly from this screen.

5. Folder path: The breadcrumbs show in which folder you are currently.

6. Click the Edit button to change any component of a folder or file, i.e. its name, description and tags. If you have a folder or file included in a page that you submitted for feedback, you will not be able to edit them.

Note

You can also still select files that have been submitted in another portfolio page.

7. Click into the row that contains the file you wish to display in the block to select it or click the Select button . You only see HTML files.

Warning

When you place group, institution or site files into a page, beware that these files may not be available at some point anymore when the person in charge deletes them.

8. Click Remove if you want to revert your selection.

9. Retractable: Choose whether you want to allow users to reduce the block to its heading on a page or see just the heading only automatically. The options are:

• No: The block and its content is displayed at all times.
• Yes: Allow users to reduce the block to just the heading by clicking the Retractable icon .
• Automatically retract: Only the heading of the block is visible, and the user can click the Retracted icon to view its content.
10. Click the Save button to accept your changes, or click Cancel to leave the block’s content as it is. Remove is shown only when you place the block into the page for the first time.

11. You can also click the Close button in the top left-hand corner of the modal window to either remove a newly created block before it is being saved or to cancel any changes and leave the block’s content as it is.

Note

You can only display a self-contained HTML file in a page, but not an entire site because the links to the files are not retained correctly when you upload files.