A plugin for Strapi that provides endpoints to interact with the file system, allowing you to retrieve folders and files.
This is a plugin for Strapi that provides endpoints to interact with the media library, allowing you to retrieve folders and files.
npm install strapi-plugin-file-system
or
yarn add strapi-plugin-file-system
1module.exports = ({ env }) => ({
2 // ...
3
4 'file-system': {
5 enabled: true,
6 },
7
8 // ...
9})
Once the plugin is installed and the Strapi server is running, you can access the following endpoints:
Endpoint: GET /file-system/docs/:folderName
Description: Retrieves a specific folder from the media library by its name. Replace :folderName
in the URL with the actual name of the folder.
It will also show all children/folders nested in it and files.
Warning: If you have complex structure of folders in your media library and you have few folders with same name then API will return always the first matching of folder name. In this case please use fetching a specific folder by path to have ability retrieve proper folder.
Endpoint: GET /file-system/folder?path=fullPathToFolder
Description: Retrieves a specific folder from the media library by its path. Replace fullPathToFolder
in the URL with the actual full path to the folder. First and last slashed in the path can be present or omit.
It will also show all files and folders nested in it.
Example:
Path: /resorts/location2/photos
Request: /file-system/folder?path=/resorts/location2/photos
Endpoint: GET /file-system/folders
Description: Retrieves all folders from the media library.
Endpoint: GET /file-system/root-files
Description: Retrieves all files located at the root level of the media library. Configuration
No additional configuration is required for this plugin.
Thank you for using our plugin! If you encounter any issues or have questions, please follow these instructions to submit them:
Before submitting an issue, please refer to the documentation provided with the plugin. It may already address your concern or provide a solution.
Take a moment to browse through the existing issues in our plugin's repository. Your issue might have already been reported or resolved. This can save you time and provide additional insights.
If you cannot find a resolution to your problem, follow these steps to submit an issue:
Go to the plugin's repository on GitHub.
Click on the "Issues" tab.
Click on the "New Issue" button.
Provide a clear and descriptive title for your issue.
In the issue description, explain the problem you are facing in detail. Include any relevant error messages, steps to reproduce the issue, and the expected behavior.
If applicable, provide the version of the plugin you are using, as well as information about your environment (e.g., operating system, browser, etc.).
Attach any relevant screenshots or code snippets that can help us understand the issue better.
Click on the "Submit new issue" button to create the issue.
Once you've submitted your issue, our team will review it and provide assistance as soon as possible. In the meantime, you can engage with the community:
Check for updates on your issue to see if any team members or community members have requested additional information or provided suggestions.
Feel free to participate in discussions on other open issues or pull requests if you have relevant insights or can help other users.
Contributions are welcome! If you find any issues or want to add new features, feel free to open an issue or submit a pull request.
This plugin is licensed under the MIT License. See the LICENSE file for more details.
npm install strapi-plugin-file-system
Check out the available plugin resources that will help you to develop your plugin or provider and get it listed on the marketplace.