{"id":148526,"date":"2021-10-13T06:13:35","date_gmt":"2021-10-13T06:13:35","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/upload-multiple-media-by-api\/"},"modified":"2026-08-24T05:44:06","modified_gmt":"2026-08-24T05:44:06","slug":"upload-multiple-media-by-api","status":"publish","type":"plugin","link":"https:\/\/tuk.wordpress.org\/plugins\/upload-multiple-media-by-api\/","author":14480122,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.6.0","stable_tag":"1.6.0","tested":"7.1","requires":"5.0","requires_php":"5.6","requires_plugins":null,"header_name":"Upload Multiple Media by API","header_author":"Sandeep Jain","header_description":"Upload multiple media by Api.","assets_banners_color":"8992ed","last_updated":"2026-08-24 05:44:06","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1565,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["changelog","description"],"tags":{"1.4":{"tag":"1.4","author":"sandeepjainlive","date":"2025-04-16 04:02:15"},"1.5.1":{"tag":"1.5.1","author":"sandeepjainlive","date":"2026-08-23 11:10:18"},"1.6.0":{"tag":"1.6.0","author":"sandeepjainlive","date":"2026-08-24 05:44:06"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2613438,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":2613422,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.4","1.5.1","1.6.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":2613517,"resolution":"1","location":"assets","locale":"","width":1920,"height":1080}},"screenshots":[]},"plugin_section":[],"plugin_tags":[1556,189854,3191,62888,23853],"plugin_category":[],"plugin_contributors":[186216],"plugin_business_model":[],"class_list":["post-148526","plugin","type-plugin","status-publish","hentry","plugin_tags-api","plugin_tags-headless-wordpress","plugin_tags-media-upload","plugin_tags-multiple-upload","plugin_tags-rest-api","plugin_contributors-sandeepjainlive","plugin_committers-sandeepjainlive"],"banners":{"banner":"https:\/\/ps.w.org\/upload-multiple-media-by-api\/assets\/banner-772x250.png?rev=2613422","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/upload-multiple-media-by-api\/assets\/icon-128x128.png?rev=2613438","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/upload-multiple-media-by-api\/assets\/screenshot-1.png?rev=2613517","caption":""}],"raw_content":"<!--section=changelog-->\n<h4>1.6.0<\/h4>\n\n<ul>\n<li>Added optional REST API authentication.<\/li>\n<li>Added admin settings page.<\/li>\n<li>Added upload_files capability check.<\/li>\n<li>Added detailed per-file API responses.<\/li>\n<li>Added duplicate detection using a content hash.<\/li>\n<li>Added maximum files per request setting.<\/li>\n<li>Added maximum file size setting.<\/li>\n<li>Added allowed MIME type settings.<\/li>\n<li>Added optional post_id support.<\/li>\n<li>Preserved the existing endpoint and field name.<\/li>\n<\/ul>\n\n<h4>1.5.1<\/h4>\n\n<ul>\n<li>Fixed multiple-file handling for multipart\/form-data requests.<\/li>\n<li>Improved upload error handling.<\/li>\n<\/ul>\n\n<!--section=description-->\n<p>Upload multiple media files through the WordPress REST API with optional authentication, duplicate detection, detailed responses and upload limits.<\/p>\n\n<h3>REST API<\/h3>\n\n<p>POST \/wp-json\/mmbyapi\/v1\/upload-multiple-images<\/p>\n\n<p>File field:\nmmbyapi_file_upload[]<\/p>\n\n<p>Optional field:\npost_id<\/p>\n\n<h3>Features<\/h3>\n\n<ul>\n<li>Optional authentication using WordPress authentication\/Application Passwords.<\/li>\n<li>Backward-compatible public mode when authentication is disabled.<\/li>\n<li>Detailed per-file JSON responses.<\/li>\n<li>Duplicate detection using a content hash.<\/li>\n<li>Maximum files per request setting.<\/li>\n<li>Maximum individual file size setting.<\/li>\n<li>Allowed MIME type settings.<\/li>\n<li>Optional post attachment.<\/li>\n<\/ul>\n\n<h3>Authentication<\/h3>\n\n<p>Authentication is OFF by default for backward compatibility.<\/p>\n\n<p>When enabled, the caller must be authenticated and have the WordPress upload_files capability.<\/p>\n\n<p>Application Password example:<\/p>\n\n<p>curl -i -u \"USERNAME:APPLICATION_PASSWORD\" \\\n  -F \"mmbyapi_file_upload[]=@\/path\/to\/image1.jpg\" \\\n  -F \"mmbyapi_file_upload[]=@\/path\/to\/image2.jpg\" \\\n  \"https:\/\/example.com\/wp-json\/mmbyapi\/v1\/upload-multiple-images\"<\/p>\n\n<h3>Response<\/h3>\n\n<p>Successful uploads return attachment information including attachment ID, URL, MIME type, file size, image dimensions when available, and a content hash.<\/p>\n\n<p>Duplicate uploads return the existing attachment with <code>duplicate: true<\/code>.<\/p>\n\n<p>If some files fail and others succeed, the endpoint returns HTTP 207 with per-file results.<\/p>\n\n<h3>Duplicate detection<\/h3>\n\n<p>Duplicate detection is enabled by default. The plugin calculates a SHA-256 hash of each uploaded file and stores it as attachment metadata. Uploading identical file content returns the existing Media Library attachment instead of creating a second attachment. Renaming a file does not bypass duplicate detection.<\/p>\n\n<h3>Compatibility fixes<\/h3>\n\n<p>The 1.6.0 settings allow-list correctly validates MIME types against WordPress MIME values. PNG, JPEG\/JPG, GIF and WebP remain enabled by default. Duplicate detection also works when the same file is included more than once in a single API request.<\/p>","raw_excerpt":"Upload multiple media files through the WordPress REST API with optional authentication, duplicate detection, detailed responses and upload limits.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/148526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=148526"}],"author":[{"embeddable":true,"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sandeepjainlive"}],"wp:attachment":[{"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=148526"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=148526"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=148526"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=148526"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=148526"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/tuk.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=148526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}