====== Media and attachments ======
The Media manager, available from the left sidebar, allows you to add, remove, order and classify (in sub-directories or as images, music, video, text, etc.), and attach your media to entries.
In conventional installations, the files handled by the Media manager are located in the /public/ directory of your web site.
===== Creating a sub-directory =====
The {{2.0:controls:plus.png|[+]}} icon located next to **New directory** lets you create and name a new sub-directory.
You can create sub-directories in any level of the structure.
===== Adding files =====
Browse the sub-directories to locate the directory you want to add files to, then click on the {{2.0:controls:plus.png|[+]}} icon next to **Add files**.
The available fields allow you to:
* choose a file on you hard drive to add it to your medias.
* give a title to this file: by default, the media manager fills this field with the name of the file but you can change it here (or at a later date).
* select the "Private" checkbox if you want to be the only writer authorized to access this file from the blog's administration.
A private file remains accessible to people who know its URL, but it is hidden as long as you don't make it public.
You can use two different methods to add several files at a time :
* You can create a .zip archive, upload it then extract it (see section [[#fichiers-zip|zip files]].
* You can use the advanced file upload interface (Flash must be installed for your browser).
==== Advanced uploader ====
This interface lets you select and upload several files at a time, in one single action. To activate it, click on **Activate advanced uploader**. It will then be systematically available in your media manager.
Click on the **Choose files** button to access the relevant directory on your hard drive, then keep Ctrl key down to select several files. When the selection is done, you can still remove some files from the list by clicking on the corresponding red icon, or add more files b y clicking again on **Choose files**. When you are ready, click on **Upload**. Individual progress bars inform you that the upload is successful.
===== Downloading a zip archive of the current directory =====
You just need to clck on the "Download this directory as a zip file" link at the bottom of the page.
===== Change or fill in file details =====
From the Media manager, browse the directories to locate the file then click on its icon or its title. A form is displayed, containing the necessary fields to change the file's details.
This screen also allows you to move a file to another directory by selecting the destination directory in the **New directory** drop-down menu.
Finally, you may replace the file with another.
Don't forget to click on **Save** to confirm your modifications.
===== Adding files directly =====
If you have a direct access to your media directory (e.g. through FTP), you can add files directly, thus bypassing the Media manager interface. Once you have uploaded the files, access the directory where you placed them through the Media manager - the new files will be visible as if you had uploaded them through the web interface.
===== Special file types ====
==== Images ====
When you add an image to your media, Dotclear creates several thumbnails:
* //square// : 48 pixel high square.
* //thumbnail// : The longest side of the picture is reduced to 100 pixels.
* //small// : The longest side of the picture is reduced to 240 pixels.
* //medium// : The longest side of the picture is reduced to 448 pixels.
If the image is of JPEG format and includes [[:glossary#EXIF]], [[:glossary#IPTC]] or [[:glossary#XMP]] data, these will be read and saved.
* You can define a title format in the **Blog settings** page to generate a title from the image's metadata automatically (for example, its title and the date it was taken in case of a photo).
* You can change the size of the longest side of the generated //thumbnail//, //small// and //medium// images in the **Blog settings** page.
==== ZIP files ====
Zip files are supported by the Media manager. You may list their content or extract them simply by clicking on the file to access the media details page.
==== MP3 files ====
Uploaded MP3 files can be played directly from the Media manager interface using a small Flash player (so you should have Flash installed to use this feature).
===== Attachments =====
You can join files to any existing entry. From the [[entries#creation-et-edition|entry edition interface]], select **Add files to this entry** from the right panel. The Media manager opens and lets you pick the file to ad to your entry. You may modify and add files to your media during this phase.
To add a file to your entry, simply click on the {{2.0:controls:plus.png|[+]}} icon of the file.
To remove an attachment from an entry, click on the {{2.0:controls:check-off.png|red cross}} icon in the attachment list. Please note that the file will not be deleted from your media.
Any file joined to an entry will be seen as an attachment in the [[feeds|feeds]]. If the file is an MP3, you get what is called a Podcast.