Title: Upload Multiple Media by API
Author: sandeepjainlive
Published: <strong>13 spalio, 2021</strong>
Last modified: 3 rugsėjo, 2026

---

Ieškoti įskiepiuose

![](https://ps.w.org/upload-multiple-media-by-api/assets/banner-772x250.png?rev=
2613422)

![](https://ps.w.org/upload-multiple-media-by-api/assets/icon-128x128.png?rev=2613438)

# Upload Multiple Media by API

 Autorius [sandeepjainlive](https://profiles.wordpress.org/sandeepjainlive/)

[Parsisiųsti](https://downloads.wordpress.org/plugin/upload-multiple-media-by-api.1.6.1.zip)

 * [Informacija](https://lt.wordpress.org/plugins/upload-multiple-media-by-api/#description)
 * [Atsiliepimai](https://lt.wordpress.org/plugins/upload-multiple-media-by-api/#reviews)
 * [Kūrimas](https://lt.wordpress.org/plugins/upload-multiple-media-by-api/#developers)

 [Pagalba](https://wordpress.org/support/plugin/upload-multiple-media-by-api/)

## Aprašymas

Upload multiple media files through the WordPress REST API with optional authentication,
duplicate detection, detailed responses and upload limits.

### Video Tutorial

Learn how to upload multiple media files through the WordPress REST API:

### REST API

POST /wp-json/mmbyapi/v1/upload-multiple-images

File field:
 mmbyapi_file_upload[]

Optional field:
 post_id mmbyapi_alt_texts[]

### Features

 * Optional authentication using WordPress authentication/Application Passwords.
 * Backward-compatible public mode when authentication is disabled.
 * Detailed per-file JSON responses.
 * Duplicate detection using a content hash.
 * Maximum files per request setting.
 * Maximum individual file size setting.
 * Allowed MIME type settings.
 * Optional post attachment.
 * Optional ALT text for each uploaded image.

### Use Cases

 * Headless WordPress websites using Next.js, React, Vue or other frontend frameworks.
 * iOS and Android applications that need to upload multiple media files to WordPress.
 * React Native and other JavaScript-based applications communicating with WordPress
   through the REST API.
 * Custom frontend applications that need programmatic multi-file media uploads.
 * WooCommerce applications that need to upload product, gallery or supporting media
   through an API-driven workflow.
 * Backend integrations, automation tools and custom services that need to send 
   multiple media files to WordPress.
 * Multisite and enterprise WordPress projects requiring controlled API-based media
   uploads.
 * Content publishing workflows where uploaded media needs to be optionally attached
   to an existing WordPress post.
 * AI-powered applications and external services that need to send generated images
   or supported media to WordPress.
 * Decoupled WordPress architectures where WordPress acts as the CMS and media backend
   while the frontend is hosted separately.

### Authentication

Authentication is OFF by default for backward compatibility.

When enabled, the caller must be authenticated and have the WordPress upload_files
capability.

Application Password example:

curl -i -u „USERNAME:APPLICATION_PASSWORD” \
 -F „mmbyapi_file_upload[]=@/path/to/
image1.jpg” \ -F „mmbyapi_file_upload[]=@/path/to/image2.jpg” \ „https://example.
com/wp-json/mmbyapi/v1/upload-multiple-images”

### Response

Successful uploads return attachment information including attachment ID, URL, MIME
type, file size, image dimensions when available, ALT text, and a content hash.

Duplicate uploads return the existing attachment with `duplicate: true`.

If some files fail and others succeed, the endpoint returns HTTP 207 with per-file
results.

### Duplicate detection

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.

### Compatibility fixes

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.

## Ekrano nuotraukos

[[

## Atsiliepimai

Įskiepis neturi atsiliepimų.

## Programuotojai ir komandos nariai

“Upload Multiple Media by API” yra atviro kodo programa. Prie jos sukūrimo prisidėję
žmonės surašyti toliau.

Autoriai

 *   [ sandeepjainlive ](https://profiles.wordpress.org/sandeepjainlive/)

[Išverskite “Upload Multiple Media by API” į savo kalbą.](https://translate.wordpress.org/projects/wp-plugins/upload-multiple-media-by-api)

### Domina programavimas?

[Peržiūrėkite kodą](https://plugins.trac.wordpress.org/browser/upload-multiple-media-by-api/),
naršykite [SVN repozitorijoje](https://plugins.svn.wordpress.org/upload-multiple-media-by-api/),
arba užsiprenumeruokite [kodo pakeitimų žurnalą](https://plugins.trac.wordpress.org/log/upload-multiple-media-by-api/)
per [RSS](https://plugins.trac.wordpress.org/log/upload-multiple-media-by-api/?limit=100&mode=stop_on_copy&format=rss).

## Pakeitimų istorija

#### 1.6.1

 * Added optional ALT text support for uploaded images.
 * Added per-image ALT text support through the REST API.
 * Included ALT text in per-file API responses.

#### 1.6.0

 * Added optional REST API authentication.
 * Added admin settings page.
 * Added upload_files capability check.
 * Added detailed per-file API responses.
 * Added duplicate detection using a content hash.
 * Added maximum files per request setting.
 * Added maximum file size setting.
 * Added allowed MIME type settings.
 * Added optional post_id support.
 * Preserved the existing endpoint and field name.

#### 1.5.1

 * Fixed multiple-file handling for multipart/form-data requests.
 * Improved upload error handling.

## Metainformacija

 *  Version **1.6.1**
 *  Atnaujinta **prieš 19 val**
 *  Aktyvių instaliacijų **10+**
 *  WordPress versija ** 5.0 ar naujesnė **
 *  Ištestuota iki **7.1**
 *  PHP versija ** 5.6 ar naujesnė **
 *  Kalba
 * [English (US)](https://wordpress.org/plugins/upload-multiple-media-by-api/)
 * Žymos
 * [api](https://lt.wordpress.org/plugins/tags/api/)[Headless WordPress](https://lt.wordpress.org/plugins/tags/headless-wordpress/)
   [media upload](https://lt.wordpress.org/plugins/tags/media-upload/)[multiple upload](https://lt.wordpress.org/plugins/tags/multiple-upload/)
   [rest-api](https://lt.wordpress.org/plugins/tags/rest-api/)
 *  [Daugiau](https://lt.wordpress.org/plugins/upload-multiple-media-by-api/advanced/)

## Įvertinimai

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/upload-multiple-media-by-api/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/upload-multiple-media-by-api/reviews/)

## Autoriai

 *   [ sandeepjainlive ](https://profiles.wordpress.org/sandeepjainlive/)

## Pagalba

Turite pastabų? Reikia pagalbos?

 [Peržiūrėti pagalbos forumą](https://wordpress.org/support/plugin/upload-multiple-media-by-api/)