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
fc614823
Commit
fc614823
authored
4 years ago
by
Neuber, Eugen Ramon
Browse files
Options
Downloads
Patches
Plain Diff
Add `decompress-zip` to file handling demo
parent
280ea336
No related branches found
No related tags found
No related merge requests found
Pipeline
#16226
passed
4 years ago
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/file-handling/src/demo.js
+26
-7
26 additions, 7 deletions
packages/file-handling/src/demo.js
with
26 additions
and
7 deletions
packages/file-handling/src/demo.js
+
26
−
7
View file @
fc614823
...
...
@@ -81,44 +81,63 @@ export class FileSourceDemo extends ScopedElementsMixin(LitElement) {
</div>
<div class="content">
<h2 class="subtitle">Send files via event</h2>
<p>There is no restriction for a specific file type:</p>
<button @click="
${()
=>
{
this
.
_
(
"
#file-source1
"
).
setAttribute
(
"
dialog-open
"
,
""
);
}}
"
class="button is-primary">
Open dialog
</button>
<dbp-file-source id="file-source1"
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-sources="local,nextcloud"
allowed-mime-types="*/*"></dbp-file-source>
enabled-sources="local,nextcloud"
></dbp-file-source>
<p>Only images are allowed here (JPG, PNG, GIF, TIF, ...):</p>
<button @click="
${()
=>
{
this
.
_
(
"
#file-source2
"
).
setAttribute
(
"
dialog-open
"
,
""
);
}}
"
class="button is-primary">
Open dialog
</button>
<dbp-file-source id="file-source2" lang="en" url="
${
this
.
url
}
" allowed-mime-types="image/*"
<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-sources="local,nextcloud"
text="Please select images"></dbp-file-source>
<p>This is for PDF only:</p>
<button @click="
${()
=>
{
this
.
_
(
"
#file-source3
"
).
setAttribute
(
"
dialog-open
"
,
""
);
}}
"
class="button is-primary">
Open dialog
</button>
<dbp-file-source id="file-source3" lang="en" url="
${
this
.
url
}
" allowed-mime-types="application/pdf"
<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-sources="local,nextcloud"
text="Einreichung als PDF" button-label="PDF auswählen"></dbp-file-source>
<p>Text and images (JPG, PNG, GIF, TIF, ...) :</p>
text="Submit only PDF files" button-label="PDF auswählen"></dbp-file-source>
<p>Text and images (JPG, PNG, GIF, TIF, ...) :</p>
<button @click="
${()
=>
{
this
.
_
(
"
#file-source4
"
).
setAttribute
(
"
dialog-open
"
,
""
);
}}
"
class="button is-primary">
Open dialog
</button>
<dbp-file-source id="file-source4" lang="en" url="
${
this
.
url
}
" allowed-mime-types="text/plain,image/*"
<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-sources="local,nextcloud"
text="Please select text or images"></dbp-file-source>
<p>PDFs also in ZIPS :</p>
<button @click="
${()
=>
{
this
.
_
(
"
#file-source5
"
).
setAttribute
(
"
dialog-open
"
,
""
);
}}
"
class="button is-primary">
Open dialog
</button>
<dbp-file-source id="file-source5" lang="en" url="
${
this
.
url
}
"
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-sources="local,nextcloud"
text="Please select PDF(s) or ZIP(s) with PDF(s)"></dbp-file-source>
<dbp-file-sink lang="en"></dbp-file-sink>
</div>
</section>
...
...
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