媒体库简介
¥Introduction to the Media Library
媒体库是一个 Strapi 插件,默认情况下始终处于激活状态且无法停用。当应用处于开发和生产环境中时都可以访问它。
¥The Media Library is a Strapi plugin that is always activated by default and cannot be deactivated. It is accessible both when the application is in a development and production environment.
管理员可以从管理面板主导航中的 媒体库访问媒体库。
¥Administrators can access the Media Library from Media Library in the main navigation of the admin panel.
媒体库显示在应用中上传的所有资源,无论是通过媒体库本身还是在管理媒体字段时通过内容管理器。上传到媒体库的资源可以使用 内容管理者 插入到内容类型中。
¥The Media Library displays all assets uploaded in the application, either via the Media Library itself or via the Content Manager when managing a media field. Assets uploaded to the Media Library can be inserted into content-types using the Content Manager.
从媒体库中,可以:
¥From the Media Library, it is possible to:
-
上传新资源(参见 添加资源)或创建新文件夹(参见 使用文件夹组织资源)1,
¥upload a new asset (see adding assets) or create a new folder (see organizing assets with folders) 1,
-
对资源和文件夹进行排序或设置过滤器 2 以更轻松地查找资源和文件夹,
¥sort the assets and folders or set filters 2 to find assets and folders more easily,
-
在列表视图 和网格视图 之间切换以显示资源、访问设置 到 配置视图,并进行文本搜索 3 以查找特定资源或文件夹,
¥toggle between the list view and the grid view to display assets, access settings to configure the view, and make a textual search 3 to find a specific asset or folder,
-
并查看、浏览和管理文件夹 4。
¥and view, navigate through, and manage folders 4.
单击用户界面右侧的搜索图标 以使用文本搜索并更快地找到你的资源或文件夹之一!
¥Click the search icon on the right side of the user interface to use a text search and find one of your assets or folders more quickly!
过滤资源
¥Filtering assets
在界面左侧的文件夹和资源列表正上方,显示一个 过滤器按钮。它允许设置一个或多个基于条件的过滤器,这些过滤器相互叠加(即,如果你设置多个条件,则仅显示与所有条件匹配的资源)。
¥Right above the list of folders and assets, on the left side of the interface, a Filters button is displayed. It allows setting one or more condition-based filters, which add to one another (i.e. if you set several conditions, only the assets that match all the conditions will be displayed).
要设置新过滤器:
¥To set a new filter:
-
单击 过滤器按钮。
¥Click on the Filters button.
-
单击第一个下拉列表以选择将应用条件的字段。
¥Click on the 1st drop-down list to choose the field on which the condition will be applied.
-
单击第二个下拉列表以选择要应用的条件类型。
¥Click on the 2nd drop-down list to choose the type of condition to apply.
-
对于基于要过滤的资源类型的条件,请单击第 3 个下拉列表并选择要包含或排除的文件类型。对于基于日期和时间的条件(即 createdAt 或 updatedAt 字段),单击左侧字段以选择日期,然后单击右侧字段以选择时间。
¥For conditions based on the type of asset to filter, click on the 3rd drop-down list and choose a file type to include or exclude. For conditions based on date and time (i.e. createdAt or updatedAt fields), click on the left field to select a date and click on the right field to select a time.
-
单击添加过滤器按钮。
¥Click on the Add filter button.
激活后,过滤器会显示在 过滤器按钮旁边。可以通过单击删除图标 将其删除。
¥When active, filters are displayed next to the Filters button. They can be removed by clicking on the delete icon .
对资源进行排序
¥Sorting assets
在文件夹和资源列表的正上方,在 过滤器按钮旁边,在界面左侧,显示一个下拉按钮。它允许按上传日期、字母顺 序或更新日期对资源进行排序。单击下拉按钮并从列表中选择一个选项以自动显示已排序的资源。
¥Just above the list of folders and assets and next to the Filters button, on the left side of the interface, a drop-down button is displayed. It allows to sort the assets by upload date, alphabetical order or date of update. Click on the drop-down button and select an option in the list to automatically display the sorted assets.
配置视图
¥Configuring the view
就在文件夹和资源列表的上方,在界面的右侧,有一组 3 个按钮。单击 配置媒体库的默认视图。
¥Just above the list of folders and assets, on the right side of the interface, there is a group of 3 buttons. Click on to configure the default view for the Media library.
从那里你可以:
¥From there you can:
-
使用每页条目下拉列表定义默认显示的资源数量
¥Use the Entries per page dropdown to define the number of assets displayed by default
-
使用默认排序顺序下拉列表定义资源显示的默认顺序。当你在媒体库中进行 对资源进行排序 时,可以覆盖此设置。
¥Use the Default sort order dropdown the define the default order in which assets are displayed. This can be overriden when you sort assets in the Media Library.
这两个设置均用作媒体库和 内容管理器媒体上传模式 中的默认设置。此处保存的设置对于所有用户来说是整个 Strapi 项目的全局设置。
¥Both settings are used as the defaults in the Media Library and in the Content Manager media upload modal. The settings saved here are global across the entire Strapi project for all users.