[WordPress] 外掛分享: Upload Multiple Media by API

首頁外掛目錄 › Upload Multiple Media by API
WordPress 外掛 Upload Multiple Media by API 的封面圖片
10+
安裝啟用
尚無評分
7 天前
最後更新
問題解決
WordPress 5.0+ PHP 5.6+ v1.6.0 上架:2021-10-12

內容簡介

Upload Multiple Media by API 外掛允許使用者透過 WordPress REST API 同時上傳多個媒體檔案,並提供選擇性驗證、重複檔案檢測、詳細回應及上傳限制等功能,提升媒體管理效率。

【主要功能】
• 支援多檔案上傳
• 選擇性驗證功能
• 重複檔案檢測
• 詳細的 JSON 回應
• 上傳檔案大小限制
• 允許的 MIME 類型設定

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.6.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Upload Multiple Media by API」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Upload multiple media files through the WordPress REST API with optional authentication, duplicate detection, detailed responses and upload limits.
REST API
POST /wp-json/mmbyapi/v1/upload-multiple-images
File field:
mmbyapi_file_upload[]
Optional field:
post_id
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.

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, 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.

延伸相關外掛

文章
Filter
Mastodon