Skip to main content

Smallsite Design

Online management help

13. Files

Files can be images or other media or any other type like PDFs or documents.

For multilingual purposes, consider a file as a set of variant files, one of which is for the master locale. Others are variants for other locales, such as screenshots with text, or simply as a variant for a reading order opposite to the master locale, such as for a non-text banner picture that has a logo at one end and so needs to be swapped around because the overlay text is offset from the opposite end.

Only one version of a variant is kept at a time, with new versions overwriting it. Generation and version management of files needs to be done outside Smallsite Design, with only the latest of each variant in the set kept on the site.

Purposes

Each file is allocated to a purpose to limit what files are shown in various file selection lists.

A site may accumulate dozens or even hundreds of files, but for some purposes, such as for a banner, there might only be one or two. To eliminate showing all files when selecting what to use for such purposes when there are very few candidates, each file is allocated to a purpose, and then for any selection list Smallsite Design specifies which purposes can be shown for it. Where several purposes are allowed in a selection list, the order is specified to place those files of more suitable purposes at the top of the list.

The purposes to which files are assigned upon uploading, depending upon dimensions for images, are:
#PurposeSize (L x W px)Description
1Banner650x(100-800)Image for use as a full-width banner. The text is superimposed on this, and scaled with it
2Insert(100-195)x(100-800),
390x(200-800)
Image for the end of a banner. It will scale with the height and padding of the text. For a floating logo, perhaps use a transparent background with some padding. If there is text in the logo, use the second set of Size as it allows for a higher resolution more suitable for rendering text
3Card350x210Image size that must be used with an article's basic aside or a category's file for it to be allowed in a Cards navigation list
4Aside(200-350)x(160-800)Image sizes allowed for using in a basic aside. Allows for use in Gallery navigation array
5Icon32x32Can be used as the site icon that appears in search engine results and on the page's browser tab
6ImageOther than aboveFor images that don't fit into the other image dimension ranges
7Audio--Audio files
8Video720p alright for asidesVideo files. Preferably keep to under a minute to minimise site archive size
9Other--Any other file

How a file is displayed in a browser is dependent upon its internal format, which is indicated by its mime type. While files for a particular mime type may have multiple possible extensions, to keep things simple, Smallsite Design requires only one extension be used for one mime type, and these are specified in the Mime types section of the Settings page. Any files that have an extension not listed in that section can only be included as part of a File element on an article page to allow downloading it.

Descriptions of the navigation bar items.

The files navigation bar for a single purpose is:
Sample Files page navigation bar
The files navigation bar for a single file is:
Sample file navigation bar
where:
#ItemDescription
aPurposeName of the purpose that the file is grouped by
bBanner: 1Purpose name: number of files. Repeated for each purpose
cFileUnique identifier for the file, as a jump back to the purpose page
dExtensionFile extension corresponding to Mime
eMimeInternal file format that tells the browser how to display the file
fAddAdd a file. Only shown for the master manager

List

This section lists all the files with the same purpose.

The columns for the file list are:
#NameDescription
1File ID | …File identifier as a jump to the file's details, scaled-down image, file extension
2Text | …Descriptive text for the file, copyright owner name, optionally as a link to their page, mime type, file size, date created, update date, number of variants
3StatusWhether file will be shown in selection lists
4Used byList of jumps to the pages that use the file

The articles that Used by includes will only be those that include the file in their latest release, meaning that if the file has only been included during current editing, it will not be listed.

Details

This section provides details of the file, as well as allowing it to be overwritten with a new version and direction, or locale specific versions to be imported or overwritten.

For a new file, only the master locale field is shown.

The fields for a file's details are:
#NameDescription
1SizeFile size (bytes), width and height (pixels), colour depth (bits), channels. Only images will have all these
2DatesCreation and update dates
3TextDescriptive text for the file. Use for the HTML alt attribute for use by screen readers. The file cannot be enabled until text is provided here
4OwnerName of the owner. May be their user handle if their legals name is not available. Positioned under the image or media player
5PageOptional URL for the owner. Used to change the Owner name to a link
6StatusToggle for visibility. Plain text if file currently used or no Text. Embeddable option to make the file able to be embedded in another site, with a link to it if enabled. favicon option for icons to make it the site icon
7NameName that the file will have if downloaded. Only shown if Embeddable. If left empty, downloaded files will have a name of consisting of its file ID, site ID and extension, like 2022-05-28-21-34-56.sd.jpg
8master localeMaster locale version of the file, with the ability to overwrite it. Option to Remove all variants if the file is not used
9variantsRows to handle directional or other locale versions, with uploading/overwriting ability, and option to Remove the variant if the file is not used. Not shown for the same direction as the master locale

The Name field can be customised according to:

  1. a.! is replaced by the Site ID as defined in the Values section of the Settings page.
  2. b.+ is replaced by the File ID.
  3. c.= is replaced by the File version which will be the same as the File ID if the original version.
  4. d.@ is replaced by the current time in the format of yyyy-mm-dd-hh-mm-ss.
  5. e.& is replaced by the current locale.
  6. f.# is replaced by a 128bit random value of 32 hex characters.
  7. g.Only other characters allowed are a-z, 0-9 and .- to ensure compatibility with all file systems. Use the . to separate filename parts, especially between substitution characters and before the extension.
  8. h.Name pattern as entered (not expanded) to be 1 to 60 characters.

The Remove all option completely removes the file set. It shows for any file that is not used by any article in its latest release version. However, if a file is added during the editing of any article, the option will be displayed. If the file is removed, the element linking to the file will show an error, which can be corrected by selecting another file. An article version cannot be made into a release if it contains any elements that require a file, which is indicated by a No file: warning in its Phase details page.

By default, files cannot be linked to directly in a browser or in a page on another site, showing a page error instead. This prevents other sites using up the current site's bandwidth by downloading its files for use on their own pages, known as hotlinking. It also prevents opening the right-click menu for the file to download it from there. If made Embeddable ☑, the file can be used externally. An icon with favicon ☑ is automatically allowed to be hotlinked as it could not be shown on search engine pages or browser tabs otherwise.


External sites open in a new tab or window. Visit them at your own risk.
This site doesn't store cookies or other files on your device, but external sites might.

Manage         Help   Powered by: Smallsite Design©Patanjali Sokaris         art-a  3  0  2020-10-05-19-43-14