Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Toolkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
digital blueprint
Web Component Framework
Toolkit
Commits
fca0ba94
Unverified
Commit
fca0ba94
authored
4 years ago
by
Bekerle, Patrizio
Browse files
Options
Downloads
Patches
Plain Diff
Migrate "enabled-sources" and "enabled-destinations" file-handling attributes to "enabled-targets"
parent
623483aa
No related branches found
No related tags found
No related merge requests found
Pipeline
#16732
passed
4 years ago
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/file-handling/README.md
+4
-4
4 additions, 4 deletions
packages/file-handling/README.md
packages/file-handling/src/demo.js
+5
-5
5 additions, 5 deletions
packages/file-handling/src/demo.js
with
9 additions
and
9 deletions
packages/file-handling/README.md
+
4
−
4
View file @
fca0ba94
...
...
@@ -57,9 +57,9 @@ files from a [Nextcloud](https://nextcloud.com/) instance.
-
example
`<dbp-file-source allowed-mime-types='image/*'></dbp-file-source>`
... images (of all sub types) only
-
example
`<dbp-file-source allowed-mime-types='image/png,text/plain'></dbp-file-source>`
... PNGs or TXTs only
-
example
`<dbp-file-source allowed-mime-types='*/*'></dbp-file-source>`
... all file types (default)
-
`enabled-
source
s`
(optional, default:
`local`
): sets which sources are enabled
-
`enabled-
target
s`
(optional, default:
`local`
): sets which sources are enabled
-
you can use
`local`
and
`nextcloud`
-
example
`<dbp-file-source enabled-
source
s="local,nextcloud"></dbp-file-source>`
-
example
`<dbp-file-source enabled-
target
s="local,nextcloud"></dbp-file-source>`
-
`disabled`
(optional): disable input control
-
example
`<dbp-file-source disabled></dbp-file-source>`
-
`decompress-zip`
(optional): decompress zip file and send the contained files (including files in folders)
...
...
@@ -107,9 +107,9 @@ files to a [Nextcloud](https://nextcloud.com/) instance.
-
`lang`
(optional, default:
`de`
): set to
`de`
or
`en`
for German or English
-
example
`<dbp-file-sink lang="de"></dbp-file-sink>`
-
`enabled-
destination
s`
(optional, default:
`local`
): sets which destination are enabled
-
`enabled-
target
s`
(optional, default:
`local`
): sets which destination are enabled
-
you can use
`local`
and
`nextcloud`
-
example
`<dbp-file-sink enabled-
destination
s="local,nextcloud"></dbp-file-sink>`
-
example
`<dbp-file-sink enabled-
target
s="local,nextcloud"></dbp-file-sink>`
-
`filename`
(optional, default:
`files.zip`
): sets a file name to use for downloading the zip file
-
example
`<dbp-file-sink filename="signed-documents.zip"></dbp-file-sink>`
-
`nextcloud-auth-url`
(optional): Nextcloud Auth Url to use with the Nextcloud file picker
...
...
This diff is collapsed.
Click to expand it.
packages/file-handling/src/demo.js
+
5
−
5
View file @
fca0ba94
...
...
@@ -91,7 +91,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
allowed-mime-types="*/*"
subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url"
lang="en"
enabled-
source
s="local,nextcloud"></dbp-file-source>
enabled-
target
s="local,nextcloud"></dbp-file-source>
<p>Only images are allowed here (JPG, PNG, GIF, TIF, ...):</p>
<button @click="
${()
=>
{
this
.
_
(
"
#file-source2
"
).
setAttribute
(
"
dialog-open
"
,
""
);
}}
"
...
...
@@ -101,7 +101,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
<dbp-file-source id="file-source2" lang="en" url="
${
this
.
url
}
"
allowed-mime-types="image/*"
subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url"
enabled-
source
s="local,nextcloud"
enabled-
target
s="local,nextcloud"
text="Please select images"></dbp-file-source>
<p>This is for PDF only:</p>
...
...
@@ -112,7 +112,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
<dbp-file-source id="file-source3" lang="en" url="
${
this
.
url
}
"
allowed-mime-types="application/pdf"
subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url"
enabled-
source
s="local,nextcloud"
enabled-
target
s="local,nextcloud"
text="Submit only PDF files" button-label="PDF auswählen"></dbp-file-source>
<p>Text and images (JPG, PNG, GIF, TIF, ...) :</p>
...
...
@@ -123,7 +123,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
<dbp-file-source id="file-source4" lang="en" url="
${
this
.
url
}
"
allowed-mime-types="text/plain,image/*"
subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url"
enabled-
source
s="local,nextcloud"
enabled-
target
s="local,nextcloud"
text="Please select text or images"></dbp-file-source>
<p>PDFs also in ZIPS :</p>
...
...
@@ -135,7 +135,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
allowed-mime-types="application/pdf"
decompress-zip
subscribe="nextcloud-auth-url:nextcloud-auth-url,nextcloud-web-dav-url:nextcloud-web-dav-url,nextcloud-name:nextcloud-name,nextcloud-file-url:nextcloud-file-url"
enabled-
source
s="local,nextcloud"
enabled-
target
s="local,nextcloud"
text="Please select PDF(s) or ZIP(s) with PDF(s)"></dbp-file-source>
<dbp-file-sink lang="en"></dbp-file-sink>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment