← 全部原生指南

Xodera Plugins · Bubble Native

Xodera B2 Files Native

將應用程式附件保留在您自己的 Backblaze B2 儲存空間。允許授權使用者上傳、瀏覽與下載檔案,並明確選擇何時可公開分享檔案。

Public beta guides · Haptics instructions are in its Bubble listing

Public beta offer: free Bubble install · 7-day card trial, then US$1.50/month per plugin/project.

文件審閱日期:2026年11月6日

實用範例

將工作附件儲存在開發者自己的私人桶中

Bubble 工作需要一個持久的儲存參考,而不將即將過期的下載 URL 視為檔案身分。

`bucket_binding_id = an allowed binding to your own private bucket`;動態的 `local_uri`、`display_name`、`mime_type` 與 `expected_size` 描述所選的本機檔案。

規劃中:Check local source → Upload file → 等待 `upload_verified`。然後您的工作流程會在所屬的 Job 記錄中儲存 `asset_ref` 及其中繼資料。

使用 `asset_ref`、`size_bytes`、`mime_type` 與 `upload_status`。稍後,Resolve private read 可提供授權使用的臨時 URL。

如果在 `upload_verified` 後資料庫儲存失敗,請使用相同的資產參考重新嘗試資料庫更新,而非重新上傳。使用 Check or recover upload status 以及相同的上傳 ID 檢查 `upload_pending` 的結果。

規劃中。您的 B2 帳戶負擔儲存與下載費用。

建立擁有的附件畫廊,使用持久的檔案記錄

檔案畫廊需要名稱、類型與分頁,並且需要能在之後開啟所選資產的方式。

您的應用程式的檔案記錄在驗證上傳後會儲存已接受的 `asset_ref`、顯示名稱、MIME 以及擁有者/工作關係;請勿使用本機 URI 作為其雲端身分。

規劃中:使用 List my B2 files 建立附件清單。asset_refs 用於識別檔案;相同索引的值提供其名稱與類型。選取檔案時會將其 asset_ref 傳遞給 Get asset metadata 或 Download accepted version。

`has_more` 與 `next_cursor` 屬於目前的查詢。完成的下載會回傳 `local_output_uri`;它是裝置本機的副本,而非永久的公開連結。

在綁定、帳號或查詢變更後重設分頁。於 `transfer_error` 時,保留現有的檔案項目並顯示 `error_code`;不要悄悄以供應商端的另一個檔案版本取代它。

規劃中。您的 B2 帳戶負擔儲存與下載費用。

使發布與精確版本刪除成為有意的操作

工作人員不應在更換圖片時意外暴露私人附件或刪除所有版本。

`asset_ref = the selected accepted version`;儲存桶綁定與應用程式的檔案權限必須允許所請求的操作。

顯示目前的可見性,要求明確確認,然後執行 Change public sharing。若要移除,請以確認呼叫 Delete accepted version;在確認結果已知之前保留應用程式的中繼資料。

在 `share_changed` 之後,僅在明確授權公開分享時才使用 `visibility` 與 `public_url`。於 `delete_completed` 後,更新所屬的檔案記錄;`delete_pending` 並非最終刪除。

檢查不確定操作的結果,而非假設成功。先前發出的提供者讀取 URL 可能在到期前仍然有效;刪除資料庫列或停用分享不會召回已下載的位元組。

規劃中。您的 B2 帳戶負擔儲存與下載費用。

目前可用功能

計畫中的外掛。目前尚未安裝或可供使用。以下指南顯示預期的檔案工作流程。

建立工作流程

計畫中

規劃中的工作流程。目前的測試版尚未提供。

這些範例使用如 Lesson、Message 和 Order 的應用程式記錄。請以您自己的資料類型和元素名稱取代它們。範例媒體位址必須替換為您自己的檔案。

  1. 計畫中:在您的專案設定中,選擇 B2 儲存與允許的桶。設定其隱私、資料夾前置詞以及接受的檔案類型與大小。

  2. 使用 List B2 bindings 顯示允許的儲存選項。使用 List my B2 files 顯示當前使用者的檔案,並使用 Get my B2 file info 取得詳細資訊。

  3. 選擇檔案。設定 bucket_binding_id、local_uri、display_name、mime_type 與 expected_size,然後執行 Upload file。顯示進度,但在 upload_verified 完成前不要將檔案視為已儲存。

  4. 在您的應用記錄中儲存 asset_ref。將其用於 Get asset metadata、Resolve private read 或 Download accepted version。Change public sharing 與 Delete accepted version 需要額外確認。

工作流程圖 — 不是應用程式截圖

一次性設定

此插件計畫支援金鑰啟用。於 BestPlugins → Dashboard → Plugins 中建立或選擇您的 Bubble 應用程式專案。選取 Xodera B2 Files Native,複製其金鑰,然後開啟 Bubble → Plugins → Xodera B2 Files Native,將金鑰貼入 project_api_key。儲存一次;之後使用以下操作。每個專案中的每個插件都有其專屬金鑰。

使用您自己的 Backblaze B2 帳號並為此應用程式選擇儲存桶。決定誰可以讀取與上傳檔案。將相關使用者是/否欄位的名稱存於 b2_reader_permission_field 與 b2_writer_permission_field;預設為 b2_files_reader 與 b2_files_writer。僅授權的管理員應變更這些使用者權限。

一次性設定
  1. 在 BestPlugins → Dashboard → Plugins 中建立或選取您的 Bubble 應用程式專案。
  2. 選取此外掛並複製其專案金鑰。
  3. 計畫中:開啟 Bubble → Plugins → Xodera B2 Files Native;將金鑰貼入 project_api_key 並儲存。
  4. 加入元件,選取您的應用程式資料,並建立下方的工作流程。
  5. 目前僅限私人測試版存取。公開安裝與付費啟用尚未開放。
安裝與訂閱

For Audio Player, Video Player, Photo Editor, Audio Recorder, Files Kit and Haptics: free Bubble installation, a 7-day trial with a card, then US$1.50 per month per plugin and app project. Development and production are included, with no operation cap. File-size and feature limits still apply. Review billing and cancellation before confirming. Other plugins remain unavailable for purchase.

將結果儲存至您的應用程式

範例附件:asset_ref、相關報告/訂單、擁有者、display_name、mime_type 與 size_bytes。於 upload_verified 後儲存這些。使用 asset_ref 以稍後重新開啟檔案;暫時的讀取位址或單一裝置路徑並非永久檔案參考。若資料庫記錄儲存失敗,請重新嘗試儲存該記錄,而非再次上傳檔案。

失敗、取消與復原

若上傳結果未知,保留 upload_id 並使用 Check or recover upload status。不要自動上傳另一份副本。取消會影響未完成的傳輸,而不會影響已儲存的檔案。若存取權限過期,請重新請求檔案,而非重複使用舊的暫時位址。

功能與限制

計畫中的最大檔案大小:256 MiB,或您自行設定的較低桶限制。Backblaze 的儲存與下載費用由您的 B2 帳號負擔。公開桶中的檔案即使相關應用記錄為私密亦為公開。未提供病毒掃描保證、分段上傳、暫停或應用終止後的恢復功能。

設定、操作與結果

在 Bubble 中使用這些名稱。計畫中的功能會另行標示。

可用的測試版設定

元素設定

bucket_binding_id · textlocal_uri · textdisplay_name · textmime_type · textexpected_size · numbermetadata_json · textasset_ref · textis_active · yes_nodisabled · yes_nolanguage · textui_text_json · texttitle · textshow_preview · yes_noshow_provider_browse · yes_no

狀態

status · textis_busy · yes_noupload_id · textupload_status · textasset_ref · textdisplay_name · textmime_type · textsize_bytes · numberbytes_sent · numberprogress · numberprogress_indeterminate · yes_notemporary_read_url · textread_expires_at · textlocal_output_uri · textpublic_url · textvisibility · textnext_cursor · texthas_more · yes_noquery_revision · textfiles_json · textbuckets_json · textremote_files_json · textremote_next_cursor · textremote_has_more · yes_noremote_query_revision · textbucket_binding_id · textcleanup_pending · yes_noerror_code · texterror_message · text

事件

file_selectedupload_startedupload_transport_completedupload_verifiedupload_pendingbuckets_loadedbucket_selectedlist_loadedmetadata_loadedread_resolveddownload_completedshare_changeddelete_completeddelete_pendingbrowse_loadedtransfer_cancelledcleanup_pendingtransfer_errorsession_cleared

操作及其輸入

List allowed bucketsSelect bucket bindingCheck local sourceUpload fileCheck or recover upload statusCancel owned transferClear local sessionList application filesRefresh application filesLoad more application filesSelect asset referenceGet asset metadataResolve private readDownload accepted versionBrowse provider filesChange public sharingDelete accepted version
元素設定 · 14

規劃中的工作流程。目前的測試版尚未提供。

bucket_binding_idtext · 預設: ""
範例值<binding returned by List B2 bindings>
範例 Bubble 表達式Selected Binding's binding_id
儲存選項由 List B2 bindings 回傳。請使用其 ID 於此檔案。
local_uritext · 預設: ""
範例值file:///app-cache/attachment.jpg
範例 Bubble 表達式Offline Files' local_uri
此裝置上的可讀取檔案位置。它不是線上下載連結。
display_nametext · 預設: ""
範例值report-photo.jpg
範例 Bubble 表達式Selected Attachment's display_name
使用目前業務記錄的值;依以下限制進行驗證。
mime_typetext · 預設: ""
範例值image/jpeg
範例 Bubble 表達式Photo Editor's output_mime
使用目前業務記錄的值;依以下限制進行驗證。
expected_sizenumber · 預設: 0
範例值246975
範例 Bubble 表達式Offline Files' size_bytes
使用目前業務記錄的值;依以下限制進行驗證。
metadata_jsontext · 預設: ""
範例值{"label":"field-report"}
範例 Bubble 表達式Selected Attachment's safe_metadata_json
可選的 JSON,包含應用程式資訊,例如報告標籤。保持簡短,避免個人資料。
asset_reftext · 預設: ""
範例值<returned asset_ref>
範例 Bubble 表達式Selected B2Asset's asset_ref
來自服務的穩定不透明已接受資產身分。選取它永不繞過使用者授權。
is_activeyes_no · 預設: true
範例值yes
範例 Bubble 表達式GuideHost's view_is_active (your yes/no custom state)
在此視圖開啟時設為是,離開時設為否,以便停止播放或當前工作。
disabledyes_no · 預設: false
範例值no
範例 Bubble 表達式GuideHost's is_busy (your yes/no custom state)
當您的應用忙碌或此操作不可用時,停用該元件。
languagetext · 預設: "auto"
範例值uk
範例 Bubble 表達式Current User's preferred_language
設定 language=auto 以跟隨支援的裝置或瀏覽器語言。輸入支援的語言代碼以明確選擇。
ui_text_jsontext · 預設: ""
範例值{}
範例 Bubble 表達式App Settings' player_labels_json (supported keys only)
可選的 JSON,包含支援的按鈕標籤。留空則使用內建文字。
titletext · 預設: ""
範例值Lesson 4 — review
範例 Bubble 表達式Selected Lesson's name
可見的應用文字;留空則使用內建的本地化文字(若支援)。請勿填入憑證。
show_previewyes_no · 預設: false
範例值yes
範例 Bubble 表達式App Settings' b2_preview
顯示或隱藏檔案預覽。
show_provider_browseyes_no · 預設: false
範例值no
範例 Bubble 表達式Current User's authorized_browse_UI (presentation only)
為允許的使用者顯示或隱藏儲存空間瀏覽控制項。
操作及其輸入 · 20

規劃中的工作流程。目前的測試版尚未提供。

List allowed buckets

無操作參數

Select bucket binding
binding_idtext · 預設: —
範例值<returned allowed binding ID>
範例 Bubble 表達式Selected Binding's binding_id
使用目前業務記錄的值;依以下限制進行驗證。
Check local source

無操作參數

Upload file
acknowledge_public_bytesyes_no · 預設: —
範例值no
範例 Bubble 表達式Public bucket disclosure Checkbox is checked (private bucket: no)
使用目前業務記錄的值;依以下限制進行驗證。
confirm_retryyes_no · 預設: —
範例值no
範例 Bubble 表達式Retry Checkbox is checked after confirmed clean pending status
使用目前業務記錄的值;依以下限制進行驗證。
Check or recover upload status
upload_idtext · 預設: —
範例值<original returned upload_id>
範例 Bubble 表達式Current UploadIntent's upload_id
使用目前業務記錄的值;依以下限制進行驗證。
Cancel owned transfer

無操作參數

Clear local session

無操作參數

List application files

無操作參數

Refresh application files

無操作參數

Load more application files

無操作參數

Select asset reference
asset_reftext · 預設: —
範例值<returned asset_ref>
範例 Bubble 表達式Selected B2Asset's asset_ref
來自服務的穩定不透明已接受資產身分。選取它永不繞過使用者授權。
Get asset metadata
asset_reftext · 預設: —
範例值<returned asset_ref>
範例 Bubble 表達式Selected B2Asset's asset_ref
來自服務的穩定不透明已接受資產身分。選取它永不繞過使用者授權。
Resolve private read
asset_reftext · 預設: —
範例值<returned asset_ref>
範例 Bubble 表達式Selected B2Asset's asset_ref
來自服務的穩定不透明已接受資產身分。選取它永不繞過使用者授權。
Download accepted version
asset_reftext · 預設: —
範例值<returned asset_ref>
範例 Bubble 表達式Selected B2Asset's asset_ref
來自服務的穩定不透明已接受資產身分。選取它永不繞過使用者授權。
Browse provider files
prefixtext · 預設: —
範例值""
範例 Bubble 表達式Authorized Browse Settings' prefix
使用目前業務記錄的值;依以下限制進行驗證。
load_moreyes_no · 預設: —
範例值no
範例 Bubble 表達式Load More button only, for unchanged query
使用目前業務記錄的值;依以下限制進行驗證。
Change public sharing
asset_reftext · 預設: —
範例值<returned asset_ref>
範例 Bubble 表達式Selected B2Asset's asset_ref
來自服務的穩定不透明已接受資產身分。選取它永不繞過使用者授權。
enabledyes_no · 預設: —
範例值no
範例 Bubble 表達式Public Share Checkbox is checked after separate confirmation
使用目前業務記錄的值;依以下限制進行驗證。
confirmyes_no · 預設: —
範例值yes — explicit confirmation only
範例 Bubble 表達式Confirm Checkbox is checked
使用目前業務記錄的值;依以下限制進行驗證。
Delete accepted version
asset_reftext · 預設: —
範例值<returned asset_ref>
範例 Bubble 表達式Selected B2Asset's asset_ref
來自服務的穩定不透明已接受資產身分。選取它永不繞過使用者授權。
confirmyes_no · 預設: —
範例值yes — explicit confirmation only
範例 Bubble 表達式Confirm Checkbox is checked
使用目前業務記錄的值;依以下限制進行驗證。
List B2 bindings
environmenttext · 預設: —
範例值development
範例 Bubble 表達式App Settings' selected_environment
使用目前業務記錄的值;依以下限制進行驗證。

回傳值

ok · yes/nostatus · texterror_code · textbinding_ids · text listlabels · text listprivacy · text listmax_size_bytes · number list
List my B2 files
environmenttext · 預設: —
範例值development
範例 Bubble 表達式App Settings' selected_environment
使用目前業務記錄的值;依以下限制進行驗證。
binding_idtext · 預設: —
範例值<returned allowed binding ID>
範例 Bubble 表達式Selected Binding's binding_id
使用目前業務記錄的值;依以下限制進行驗證。
limitnumber · 預設: —
範例值50
範例 Bubble 表達式Gallery Settings' page_size
使用目前業務記錄的值;依以下限制進行驗證。
cursortext · 預設: —
範例值""
範例 Bubble 表達式Previous List my B2 files result's next_cursor; empty on first page
使用目前業務記錄的值;依以下限制進行驗證。

回傳值

ok · yes/nostatus · texterror_code · textasset_refs · text listdisplay_names · text listmime_types · text listsize_bytes · number listcreated_ats · text listvisibility · text listpublic_urls · text listprovider_status · text listinspection_status · text listmetadata_labels · text listhas_more · yes/nonext_cursor · textquery_revision · text
Get my B2 file info
environmenttext · 預設: —
範例值development
範例 Bubble 表達式App Settings' selected_environment
使用目前業務記錄的值;依以下限制進行驗證。
binding_idtext · 預設: —
範例值<returned allowed binding ID>
範例 Bubble 表達式Selected Binding's binding_id
使用目前業務記錄的值;依以下限制進行驗證。
asset_reftext · 預設: —
範例值<returned asset_ref>
範例 Bubble 表達式Selected B2Asset's asset_ref
來自服務的穩定不透明已接受資產身分。選取它永不繞過使用者授權。

回傳值

ok · yes/nostatus · texterror_code · textasset_ref · textdisplay_name · textmime_type · textsize_bytes · numbercreated_at · textvisibility · textpublic_url · textprovider_status · textinspection_status · textmetadata_label · text
狀態與事件

規劃中的工作流程。目前的測試版尚未提供。

狀態

status · text

此操作的當前結果。於儲存成功前使用相符的完成事件。

is_busy · yes_no

工作仍在進行中。請在開始其他操作前稍候。

upload_id · text

此項目或操作的識別碼。請將其與相應的應用記錄一起保存。重試不確定結果時,使用相同的請求識別碼。

upload_status · text

此操作的當前結果。於儲存成功前使用相符的完成事件。

asset_ref · text

此項目或操作的識別碼。請將其與相應的應用記錄一起保存。重試不確定結果時,使用相同的請求識別碼。

display_name · text

所選項目的當前值。於相關事件後讀取。

mime_type · text

所選項目的當前值。於相關事件後讀取。

size_bytes · number

所選項目的當前值。於相關事件後讀取。

bytes_sent · number

所選項目的當前值。於相關事件後讀取。

progress · number

所選項目的當前值。於相關事件後讀取。

progress_indeterminate · yes_no

所選項目的當前值。於相關事件後讀取。

temporary_read_url · text

所選項目的當前值。於相關事件後讀取。

read_expires_at · text

所選項目的當前值。於相關事件後讀取。

local_output_uri · text

此裝置上的檔案位置。若必須保留在線上,請另行保存或上傳檔案。

public_url · text

所選項目的當前值。於相關事件後讀取。

visibility · text

所選項目的當前值。於相關事件後讀取。

next_cursor · text

所選項目的當前值。於相關事件後讀取。

has_more · yes_no

所選項目的當前值。於相關事件後讀取。

query_revision · text

所選項目的當前值。於相關事件後讀取。

files_json · text

所選項目的當前值。於相關事件後讀取。

buckets_json · text

所選項目的當前值。於相關事件後讀取。

remote_files_json · text

所選項目的當前值。於相關事件後讀取。

remote_next_cursor · text

所選項目的當前值。於相關事件後讀取。

remote_has_more · yes_no

所選項目的當前值。於相關事件後讀取。

remote_query_revision · text

所選項目的當前值。於相關事件後讀取。

bucket_binding_id · text

此項目或操作的識別碼。請將其與相應的應用記錄一起保存。重試不確定結果時,使用相同的請求識別碼。

cleanup_pending · yes_no

所選項目的當前值。於相關事件後讀取。

error_code · text

上一次操作的錯誤資訊。顯示有用的訊息並提供相關的重試。

error_message · text

上一次操作的錯誤資訊。顯示有用的訊息並提供相關的重試。

事件

file_selected

當此事件發生時,從同一元素讀取相關狀態。

upload_started

當此事件發生時,從同一元素讀取相關狀態。

upload_transport_completed

當此事件發生時,從同一元素讀取相關狀態。

upload_verified

當此事件發生時,從同一元素讀取相關狀態。

upload_pending

當此事件發生時,從同一元素讀取相關狀態。

buckets_loaded

當此事件發生時,從同一元素讀取相關狀態。

bucket_selected

當此事件發生時,從同一元素讀取相關狀態。

list_loaded

當此事件發生時,從同一元素讀取相關狀態。

metadata_loaded

當此事件發生時,從同一元素讀取相關狀態。

read_resolved

當此事件發生時,從同一元素讀取相關狀態。

download_completed

當此事件發生時,從同一元素讀取相關狀態。

share_changed

當此事件發生時,從同一元素讀取相關狀態。

delete_completed

當此事件發生時,從同一元素讀取相關狀態。

delete_pending

當此事件發生時,從同一元素讀取相關狀態。

browse_loaded

當此事件發生時,從同一元素讀取相關狀態。

transfer_cancelled

當此事件發生時,從同一元素讀取相關狀態。

cleanup_pending

當此事件發生時,從同一元素讀取相關狀態。

transfer_error

當此事件發生時,從同一元素讀取相關狀態。

session_cleared

當此事件發生時,從同一元素讀取相關狀態。

開發者常問問題

我可以將暫時的讀取 URL 儲存為我的檔案嗎?

不行。請永久保存 asset_ref 及其正規中繼資料。重新授權讀取;裝置下載路徑並非 Bubble 檔案。

訂閱如何運作?

計畫價格:在 Bubble 中安裝此插件為免費。BestPlugins 存取需為每個插件在每個 Bubble 應用專案中分別訂閱:7 天免費,之後每月 US$1.50。Development 與 Live 已包含。操作次數沒有固定上限;檔案大小與功能限制仍然適用。結帳尚未開放。啟用畫面將顯示首次計費日期與取消條款。

相關指南

Marketplace 發布待處理

論壇指南未發佈

如需協助,請告訴我們您使用的插件與裝置、嘗試的操作以及發生的情況。請使用不含個人資料的範例。切勿分享您的金鑰或私人檔案。