
An advanced Strapi v5 plugin to upload files directly to specific Media Library folders via a dedicated API.
released August 14, 2026
npm install strapi-plugin-smart-media-upload
An advanced Strapi v5 plugin that provides an intelligent API endpoint for direct file uploads to specific folders in the Media Library.
folderId.POST /api/smart-media-upload/upload-file.file and files payloads.# Using pnpm
pnpm add strapi-plugin-smart-media-upload
# Using npm
npm install strapi-plugin-smart-media-uploadEnable the plugin in config/plugins.ts:
export default {
// ...
'smart-media-upload': {
enabled: true,
},
// ...
};Send a POST request to /api/smart-media-upload/upload-file with multipart/form-data.
Body Parameters:
file (File): The file you want to upload.folderId (string/number, optional): The ID of the folder in the Media Library where the file should be saved.Example with Fetch:
const formData = new FormData();
formData.append('file', fileInput.files[0]);
formData.append('folderId', '4');
const response = await fetch('http://localhost:1337/api/smart-media-upload/upload-file', {
method: 'POST',
body: formData,
});
const data = await response.json();
console.log(data);By default, the endpoint is public (auth: false). You can customize this in the plugin's route configuration if you need to restrict access to authenticated users or specific roles.
MIT
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
