內容簡介
使用BunnyAPI外掛可以上傳檔案到Bunny.net檔案存儲區,節省您網站的空間,同時加快所有圖片的速度。
詳細資訊
BunnyAPI (https://bunnyapi.com) by NoteToServices (https://notetoservices.com) 是與Bunny.net (https://bunny.net)合作的專案,旨在將Bunny.net外掛 (https://wordpress.org/plugins/bunnycdn/) 的功能擴展到WordPress領域,作為一個文件存儲和內容交付網路服務。
Bunny.net+BunnyAPI可讓您從網站直接上傳到Bunny.net,並查看或鏈接您的圖片。
此外掛需要在Bunny.net.com註冊帳戶,以及在BunnyAPI.com註冊API密鑰。
技術詳情
Bunny.net是一個CDN服務,以驚人的價格存儲和交付文件。
BunnyAPI (https://bunnyapi.com)是一個連接到Bunny.net (https://bunny.net) 的服務。
BunnyAPI只處理Bunny.net和第三方網絡應用程序之間的API通信,包括WordPress (Bunny.net+BunnyAPI外掛)。
Bunny.net+BunnyAPI外掛添加了將圖像上傳到Bunny.net並直接從Bunny.net存儲區提供的功能,使用默認主機名稱或您的選擇的主機名稱。鏈接結構被更改以指向Bunny.net上的文件。
Bunny.net+BunnyAPI外掛使用WordPress API和Bunny.net API。
緊急通知
如果您的Bunny.net拉取區名稱和存儲區名稱不匹配,這是非常必要的。
正確的做法是拉取區名稱和存儲區名稱都為“bunnystuff”,這樣可以打開外掛通信的通道。
錯誤的做法是拉取區名稱為“bunnyzone”,存儲區名稱為“bunnystuff”,這樣將匹配失敗,外掛無法通信。
因此,您的拉取區和存儲區名稱必須完全相同。
已知問題
如果沒有顯示任何東西,因為您的存儲區名稱和區名稱不匹配,最有可能存在的問題是您選擇了與默認模式不同的數據存儲網絡。BunnyAPI.com目前還沒有自動檢測這一點的功能。
您需要在存儲區的FTP和API訪問中記錄存儲數據中心的位置,例如默認情況下,所有存儲位於storage.bunnycdn.com,但您可能選擇了NY、LA或SG,那麼它將是:ny.storage.bunnycdn.com
要手動更改此設置,您需要通過以下方式更改Storage Hostname:
https://bunnyapi.com/?key=API&action=storagehostname&zone=zone&host=main|ny|la|sg
附加資訊
通過Bunny.net Media,您可以選擇原始URL或[img]短碼。
[img]短碼包含多個內置功能,包括圖像src、對齊、標題、alt、鏈接和目標。src是唯一的必要項。
[img]短碼不需要結束標籤。
[img]短碼中也可以包含引號,但不是必需的。
[img]短碼的使用:
[img src=https://bunnyapi.com/bunnyapi-logo.jpg href=https://bunnyapi.com/bunnyapi-logo.jpg link=yes|no align=left|center|right alt=”Bunny API Logo” title=”BunnyAPI website” target=_blank|_self|_top|_parent display=inline|block|contents|flex|grid|inline-block|inline-flex|inline-grid|inline-table|list-item|run-in|table|none|initial|inherit data-src=none|https://bunnyapi.com/bunnyapi-logo.jpg]
[img]短碼詳細信息:
src = 圖片的URL [必填]
href = 圖片的鏈接
外掛標籤
開發者團隊
原文外掛簡介
Use the BunnyAPI plugin to upload files to the Bunny.net file storage zone and save space on your website while speeding up all images.
Details
BunnyAPI (https://bunnyapi.com) by NoteToServices (https://notetoservices.com) is a collaboration project with Bunny.net (https://bunny.net) to extend the functionality of the Bunny.net plugin (https://wordpress.org/plugins/bunnycdn/) to WordPress, which serves as a file storage content-delivery network service.
Bunny.net+BunnyAPI allows you to upload to Bunny.net directly from your website and view or link to your images.
This plugin requires registration of an account at Bunny.net.com and registering your API key at BunnyAPI.com.
Technical Details
Bunny.net is a CDN service that stores and delivers files at hyper speeds for an amazing price.
BunnyAPI (https://bunnyapi.com) is a service that connects to Bunny.net (https://bunny.net).
BunnyAPI handles only the API communications between Bunny.net and third-party web applications, including WordPress (Bunny.net+BunnyAPI plugin).
The Bunny.net+BunnyAPI plugin adds functionality for uploading images to Bunny.net and serving them directly from your Bunny.net storage zone with the default hostname or hostname of your choice. The link structure is changed to point to the file on Bunny.net.
The Bunny.net+BunnyAPI plugin uses WordPress API and Bunny.net API.
URGENT NOTICE
It is imperative that your Bunny.net pullzone name and storagezone name match.
CORRECT: a pullzone name and a storagezone name of “bunnystuff” will be matched and open up a channel for the plugin to communicate.
INCORRECT: a pullzone name of “bunnyzone” and a storagezone name of “bunnystuff” will not be matched and therefore the plugin cannot communicate.
Hence, your Pullzone and Storage zone must have an identical name.
Known Issues
If nothing is showing up because your storage zone name and zone name do match, the most likely issue
is that you chose a different data storage network from the default. BunnyAPI.com does not have the capability of auto-detection for this yet.
On BunnyAPI.com, you will need to go to FTP & API Access under your storage zone and take note of where the storage data center is. For example,
by default, all storage is located at storage.bunnycdn.com, however you may have chosen NY, LA, or SG, in which case it would then be:
ny.storage.bunnycdn.com
To change this manully, you need to change the Storage Hostname via:
https://bunnyapi.com/?key=API&action=storagehostname&zone=zone&host=main|ny|la|sg
Additional Info
Through Bunny.net Media, you can select a raw URL or a [img] shortcode.
The [img] shortcode has multiple built-in features including image src, alignment, title, alt, link, and target. src is the only requirement.
The [img] shortcode does not require a closing tag.
The [img] shortcode may include quotes if you prefer, but quotes are not required.
[img] shortcode usage:
[img src=https://bunnyapi.com/bunnyapi-logo.jpg href=https://bunnyapi.com/bunnyapi-logo.jpg link=yes|no align=left|center|right alt=”Bunny API Logo” title=”BunnyAPI website” target=_blank|_self|_top|_parent display=inline|block|contents|flex|grid|inline-block|inline-flex|inline-grid|inline-table|list-item|run-in|table|none|initial|inherit data-src=none|https://bunnyapi.com/bunnyapi-logo.jpg]
[img] shortcode details:
src = url of image [required]
href = link to image or another url
link = link directly to image or not
align = position of image
alt = alternative text for image
title = used for a title in the link
target = how you wish to open the link of the image
display = how you want your image to be displayed
data-src = data-src used for Javascript purposes, leave blank to capture the default src or none to remove data-src
Copyright Info
Copyright (C) 2015-2021 NoteToServices
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Terms
By using this plugin and enabling BunnyAPI, you agree that your website will need to make external calls to BunnyAPI.com and Bunny.net.com.
If you do not agree to these terms, please uninstall and delete this plugin.
If you find this plugin useful, please give a review.
Bunny.net’s Terms of Service: https://bunny.net/tos
BunnyAPI’s Terms of Service: https://bunnyapi.com/?page=terms
BunnyAPI is a third-party service of Bunny.net and was developed by NoteToServices under permission of Bunny.net.
If you have any issues with the BunnyAPI plugin, please use the BunnyAPI support forums on WordPress, not the Bunny.net forums.
Bunny.net is a product of BunnyWay.
You may not redistribute this plugin or alter the name in any way without permission from NoteToServices or BunnyWay.
