视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
sap-btp-document-mgmt【文档与办公】SAP BTP Document Management Service — document storage, folder management, file upload/download, versioning, CMIS integration. Use when migrating FILE/DATASET ABAP ops to BTP cloud, storing documents for CAP apps, or implementing document management on SAP BTP.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Cloud-native document storage replacing legacy OPEN DATASET / READ DATASET ABAP operations.
cf CLI installed and logged in (cf login)# Create service (standard plan for prod, free for dev — 100MB limit)
cf create-service document-management standard my-doc-store
# Create service key
cf create-service-key my-doc-store my-key
# Retrieve credentials (save URL, user, password, repositoryId)
cf service-key my-doc-store my-key
curl -X POST \
"https://<doc-service-url>/browser/<repo-id>/root" \
-H "Content-Type: application/json" \
-u "<user>:<password>" \
-d '{
"cmisaction": "createFolder",
"propertyId[0]": "cmis:name",
"propertyValue[0]": "invoices"
}'
curl -X POST \
"https://<doc-service-url>/browser/<repo-id>/root/invoices" \
-F "file=@invoice.pdf" \
-u "<user>:<password>"
The response includes cmis:objectId — store this as the document reference.
curl "https://<doc-service-url>/browser/<repo-id>/root/invoices" \
-u "<user>:<password>"
const cds = require('@sap/cds')
const FormData = require('form-data')
const axios = require('axios')
const { getDestination } = require('@sap/cloud-sdk/connectivity')
module.exports = class InvoiceService extends cds.ApplicationService {
async init() {
this.on('uploadInvoice', async (req) => {
const { file } = req.data
const dest = await getDestination('DOC_SERVICE')
const form = new FormData()
form.append('file', file.buffer, { filename: file.name })
const res = await axios.post(
`${dest.url}/browser/${dest.repoId}/root/invoices`,
form,
{
headers: {
...form.getHeaders(),
Authorization: `Basic ${Buffer.from(
`${dest.username}:${dest.password}`
).toString('base64')}`,
},
}
)
return { documentId: res.data.properties['cmis:objectId'].value }
})
await super.init()
}
}
" Replaces OPEN DATASET / READ DATASET in ABAP Cloud
DATA(lo_file) = cl_bc_file_upload_download=>create_instance( ).
lo_file->upload_file(
iv_file_name = 'materials.csv'
iv_content_type = 'text/csv'
iv_data = lv_csv_content
).
free plan used in production → Solution: free has 100MB limit; switch to standard plan before go-live.cf service-key to get fresh credentials.# 1. Verify service instance exists and is running
cf services | grep my-doc-store
# 2. Verify CMIS endpoint responds
curl -s -o /dev/null -w "%{http_code}" \
"https://<doc-service-url>/browser/<repo-id>/root" \
-u "<user>:<password>"
# Expected: 200
# 3. Verify uploaded document is retrievable
curl -s \
"https://<doc-service-url>/browser/<repo-id>/root/invoices" \
-u "<user>:<password>" | jq '.objects[].properties["cmis:name"].value'
# Expected: list including your file name