मुख्य सामग्री पर जाएँ
Skillpedia
API और सर्वर (backend)25k · #10097

nocobase-app-plugin-file

यह क्या करती है

यह स्किल NocoBase 3 ऐप में file collections, अपलोड, डाउनलोड और preview जोड़ती है। यह उन डेवलपर्स के लिए है जिन्हें business रिकॉर्ड पर attachments चाहिए।

कब इस्तेमाल करें

  • ✓जब आप चाहते हैं कि users NocoBase ऐप में business रिकॉर्ड के साथ फ़ाइलें जोड़ें।
  • ✓जब आपको ऐप में Word, Excel या PowerPoint फ़ाइलों का preview चाहिए।
  • ✓जब UI library से कोई file component पेज पर जोड़ना हो।

Skill का लिंक

https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-file/skills/nocobase-app-plugin-file/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-file/skills/nocobase-app-plugin-file/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“क्या आप users को हर ऑर्डर के साथ फ़ाइलें जोड़ने दे सकते हैं, और मेरे NocoBase ऐप में Word या Excel attachments का preview दिखा सकते हैं?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

AI file plugin की services और route helpers का उपयोग करता है, फिर ऐप को चाहिए वे collections, पेज और अनुमतियाँ जोड़ता है। जहाँ उपलब्ध हों, वहाँ वह शामिल file preview components दोबारा इस्तेमाल करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Add files to an App

Use @nocobase/app-plugin-file/server and @nocobase/app-plugin-file/client. The plugin provides Repository managers, service tokens, and route helpers. The UI Library provides @nocobase/file-component-ui. The App or business plugin owns collections, migrations, Drive configuration, resource routes, permissions, and pages.

Inspect the App's existing registrations, migrations, disks, and resources first. Register the Server default export and the Client default factory before consumers, using the App's plugin lifecycle commands. The core does not create collections or routes.

Find and reuse the preview UI first

Inspect client/extensions/nocobase-file-component-ui/ before writing upload or preview components. Current Default templates preinstall this application-owned UI Library source and its client dependencies; older applications and other templates may not. Import from its index.ts, not from plugin-internal paths. Registering the plugin supplies services and translations; it does not automatically install or upgrade the copied UI.

Format UI Library preview Content access
DOCX / XLSX / PPTX Local @silurus/ooxml viewer Same-origin session credentials; no public URL or third-party service required
Raster image / PDF / text / Markdown / audio / video Built-in preview components See the content access rules below
Legacy DOC / XLS / PPT and OpenDocument Office Online fallback Internet-accessible absolute URL; cannot use the App session
Unsupported or unsafe active content Explanation and optional download Download still requires permission

To show a record's files as thumbnails and chips, or take uploads beside a form or a comment, install the UI Library's attachment-list component (yes n | pnpm exec shadcn add @nocobase/attachment-list; its example is @nocobase/attachment-list-demo), map file records to AttachmentFile, and open FilePreviewDialog from its onPreview. For custom attachment lists, uploads or business associations, reuse FilePreviewDialog with file records and contentUrl; it requires no repository prop. Extend the existing UI or add the necessary content adapter rather than reimplementing format detection and dropping supported formats. A DOCX download fallback indicates a request/rendering failure or an outdated/custom component, not that the plugin lacks DOCX support. Report the actual failure and preserve its evidence.

If the installed package, synchronized Skill and copied UI disagree, inspect the resolved plugin version, run pnpm nocobase skills sync to refresh guidance, and reconcile the UI source separately. Skills synchronization does not upgrade UI Library copies.

Work incrementally

  • Use standard File Repository routes, the Client File Repository and UI Library components for new attachment features. Save associations through the existing business API, whether standard CRUD or custom routes; do not migrate working business routes just to add files.
  • Extend existing services, middleware, response adapters or installed UI components where needed. A necessary compatibility handler should delegate to File Repository; do not rebuild upload, storage and metadata handling with Drive or replace the whole CRUD stack.
  • Inspect the App's registration, collection, disk and business save path together. Reuse what works; do not ask the user to choose an implementation or repeatedly explore source when the documented contract suffices.
  • Verify one small upload → metadata query → content download before building UI. Then wire the returned IDs into the existing save/detail flow. Retain uploaded IDs if the business save fails, and run the affected checks after edits stabilize.

The following business example uses collection invoice_files, resource invoiceAttachments, connection main, and disk local. Adapt these to the App.

Collection

Create an App-owned, self-contained migration under database/main/migrations/ with

अक्सर पूछे जाने वाले सवाल

क्या plugin file tables अपने-आप बनाता है?

नहीं। collections, migrations और routes ऐप या किसी business plugin के होते हैं।

फ़ाइलें कहाँ सेव होती हैं?

उस storage disk में, जिसे ऐप कॉन्फ़िगर करता है।

कौन से previews कवर होते हैं?

स्किल Word, Excel और PowerPoint के previews कवर करती है।

जानकारी

लेखक का मूल विवरण

Add file collections, uploads, downloads, DOCX/XLSX/PPTX previews, business attachments, and editable UI Library file components to a NocoBase 3 App using the public File Repository services.

repo: nocobase/nocobase

लोकप्रियता

GitHub स्टार
25k
रैंकिंग में स्थान
#10097
लाइसेंस
—
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

nocobase-app-development

25k

यह आपके एजेंट को पूर्ण NocoBase 3 व्यावसायिक एप्लिकेशन के लिए पेज, routes, डेटा, अनुमतियाँ और टेस्ट बनाने में मदद करती है।

कोडिंगसामान्य कोडिंग

shadcn

25k

यह आपके एजेंट को वेब प्रोजेक्ट में shadcn/ui कंपोनेंट खोजने, जोड़ने, ठीक करने और स्टाइल करने में मदद करती है, उनके आधिकारिक दस्तावेज़ और registries का उपयोग करके।

कोडिंगवेबसाइट और UI (frontend)

nocobase-app-plugin-development

25k

यह आपके एजेंट को मौजूदा NocoBase 3 ऐप के भीतर plugins बनाने और उनकी देखभाल करने में मदद करती है, जिसमें server, client, database और registration के हिस्से शामिल हैं।

कोडिंगAPI और सर्वर (backend)

nocobase-app-upgrade

25k

यह आपके एजेंट को NocoBase ऐप को नए template रिलीज़ तक अपग्रेड करने में मदद करती है, template के बदलाव लाते हुए आपका अपना काम बनाए रखते हुए।

कोडिंगडिप्लॉय और क्लाउड (DevOps)

मिलती-जुलती skills