Skip to content
Snippets Groups Projects
Unverified Commit fca0ba94 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Migrate "enabled-sources" and "enabled-destinations" file-handling attributes to "enabled-targets"

parent 623483aa
Branches
No related tags found
No related merge requests found
Pipeline #16732 passed
...@@ -57,9 +57,9 @@ files from a [Nextcloud](https://nextcloud.com/) instance. ...@@ -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/*'></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='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) - example `<dbp-file-source allowed-mime-types='*/*'></dbp-file-source>` ... all file types (default)
- `enabled-sources` (optional, default: `local`): sets which sources are enabled - `enabled-targets` (optional, default: `local`): sets which sources are enabled
- you can use `local` and `nextcloud` - you can use `local` and `nextcloud`
- example `<dbp-file-source enabled-sources="local,nextcloud"></dbp-file-source>` - example `<dbp-file-source enabled-targets="local,nextcloud"></dbp-file-source>`
- `disabled` (optional): disable input control - `disabled` (optional): disable input control
- example `<dbp-file-source disabled></dbp-file-source>` - example `<dbp-file-source disabled></dbp-file-source>`
- `decompress-zip` (optional): decompress zip file and send the contained files (including files in folders) - `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. ...@@ -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 - `lang` (optional, default: `de`): set to `de` or `en` for German or English
- example `<dbp-file-sink lang="de"></dbp-file-sink>` - example `<dbp-file-sink lang="de"></dbp-file-sink>`
- `enabled-destinations` (optional, default: `local`): sets which destination are enabled - `enabled-targets` (optional, default: `local`): sets which destination are enabled
- you can use `local` and `nextcloud` - you can use `local` and `nextcloud`
- example `<dbp-file-sink enabled-destinations="local,nextcloud"></dbp-file-sink>` - example `<dbp-file-sink enabled-targets="local,nextcloud"></dbp-file-sink>`
- `filename` (optional, default: `files.zip`): sets a file name to use for downloading the zip file - `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>` - 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 - `nextcloud-auth-url` (optional): Nextcloud Auth Url to use with the Nextcloud file picker
......
...@@ -91,7 +91,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { ...@@ -91,7 +91,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
allowed-mime-types="*/*" 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" 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" lang="en"
enabled-sources="local,nextcloud"></dbp-file-source> enabled-targets="local,nextcloud"></dbp-file-source>
<p>Only images are allowed here (JPG, PNG, GIF, TIF, ...):</p> <p>Only images are allowed here (JPG, PNG, GIF, TIF, ...):</p>
<button @click="${() => { this._("#file-source2").setAttribute("dialog-open", ""); }}" <button @click="${() => { this._("#file-source2").setAttribute("dialog-open", ""); }}"
...@@ -101,7 +101,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { ...@@ -101,7 +101,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
<dbp-file-source id="file-source2" lang="en" url="${this.url}" <dbp-file-source id="file-source2" lang="en" url="${this.url}"
allowed-mime-types="image/*" 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" 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-sources="local,nextcloud" enabled-targets="local,nextcloud"
text="Please select images"></dbp-file-source> text="Please select images"></dbp-file-source>
<p>This is for PDF only:</p> <p>This is for PDF only:</p>
...@@ -112,7 +112,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { ...@@ -112,7 +112,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
<dbp-file-source id="file-source3" lang="en" url="${this.url}" <dbp-file-source id="file-source3" lang="en" url="${this.url}"
allowed-mime-types="application/pdf" 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" 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-sources="local,nextcloud" enabled-targets="local,nextcloud"
text="Submit only PDF files" button-label="PDF auswählen"></dbp-file-source> text="Submit only PDF files" button-label="PDF auswählen"></dbp-file-source>
<p>Text and images (JPG, PNG, GIF, TIF, ...) :</p> <p>Text and images (JPG, PNG, GIF, TIF, ...) :</p>
...@@ -123,7 +123,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { ...@@ -123,7 +123,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
<dbp-file-source id="file-source4" lang="en" url="${this.url}" <dbp-file-source id="file-source4" lang="en" url="${this.url}"
allowed-mime-types="text/plain,image/*" 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" 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-sources="local,nextcloud" enabled-targets="local,nextcloud"
text="Please select text or images"></dbp-file-source> text="Please select text or images"></dbp-file-source>
<p>PDFs also in ZIPS :</p> <p>PDFs also in ZIPS :</p>
...@@ -135,7 +135,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) { ...@@ -135,7 +135,7 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
allowed-mime-types="application/pdf" allowed-mime-types="application/pdf"
decompress-zip 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" 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-sources="local,nextcloud" enabled-targets="local,nextcloud"
text="Please select PDF(s) or ZIP(s) with PDF(s)"></dbp-file-source> text="Please select PDF(s) or ZIP(s) with PDF(s)"></dbp-file-source>
<dbp-file-sink lang="en"></dbp-file-sink> <dbp-file-sink lang="en"></dbp-file-sink>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment