x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<div class="Polaris-Labelled--hidden"> <div class="Polaris-Labelled__LabelWrapper"> <div class="Polaris-Label"> <label class="Polaris-Label__Text"></label> </div> </div> <div data-paper-dropzone-accept-value="image/*" data-paper-dropzone-allow-multiple-value="true" data-paper-dropzone-disabled-value="false" data-paper-dropzone-disabled-class="Polaris-DropZone--isDisabled" data-paper-dropzone-focused-value="false" data-paper-dropzone-drop-on-page-value="false" data-paper-dropzone-render-preview-value="true" data-paper-dropzone-size-value="extra_large" data-paper-dropzone-remove-previews-after-upload-value="true" data-controller="paper-dropzone" data-action="click->paper-dropzone#onClick drop->paper-dropzone#onDrop dragover->paper-dropzone#onDragOver dragenter->paper-dropzone#onDragEnter dragleave->paper-dropzone#onDragLeave" class="Polaris-DropZone Polaris-DropZone--sizeExtraLarge Polaris-DropZone--hasOutline"> <div class="Polaris-DropZone__Overlay Polaris-VisuallyHidden" data-paper-dropzone-target="overlay" > <div class="Polaris-LegacyStack Polaris-LegacyStack--spacingTight Polaris-LegacyStack--vertical"> <div class="Polaris-LegacyStack__Item"> <p class="Polaris-Text--root Polaris-Text--headingLg Polaris-Text--semibold"> Drop files to upload </p> </div> </div> </div> <div class="Polaris-DropZone__Overlay Polaris-VisuallyHidden" data-paper-dropzone-target="errorOverlay" > <div class="Polaris-LegacyStack Polaris-LegacyStack--spacingTight Polaris-LegacyStack--vertical"> <div class="Polaris-LegacyStack__Item"> <p class="Polaris-Text--root Polaris-Text--headingLg Polaris-Text--semibold"> This file type isn't accepted </p> </div> </div> </div> <div class="Polaris-DropZone__Container" data-paper-dropzone-target="container"> <div data-paper-dropzone-target="fileUpload" class="Polaris-DropZone-FileUpload Polaris-DropZone-FileUpload--large"> <div class="Polaris-LegacyStack Polaris-LegacyStack--spacingTight Polaris-LegacyStack--vertical"> <div class="Polaris-LegacyStack__Item"> <img width="40" src="data:image/svg+xml,%3csvg fill='none' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill-rule='evenodd' clip-rule='evenodd' d='M20 10a10 10 0 11-20 0 10 10 0 0120 0zM5.3 8.3l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L11 7.4V15a1 1 0 11-2 0V7.4L6.7 9.7a1 1 0 01-1.4-1.4z' fill='%235C5F62'/%3e%3c/svg%3e" alt=""> </div> <div class="Polaris-LegacyStack__Item"> <div class="Polaris-DropZone-FileUpload__Button"> Add files </div> </div> <div class="Polaris-LegacyStack__Item"> <span class="Polaris-Text--root Polaris-Text--bodyMd Polaris-Text--subdued Polaris-Text--regular"> or drop files to upload </span> </div> </div> </div> <div class="Polaris-DropZone__Loader Polaris--hidden" data-paper-dropzone-target="loader"> <span class="Polaris-Spinner Polaris-Spinner--sizeLarge"> <svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"> <path d="M15.542 1.487A21.507 21.507 0 00.5 22c0 11.874 9.626 21.5 21.5 21.5 9.847 0 18.364-6.675 20.809-16.072a1.5 1.5 0 00-2.904-.756C37.803 34.755 30.473 40.5 22 40.5 11.783 40.5 3.5 32.217 3.5 22c0-8.137 5.3-15.247 12.942-17.65a1.5 1.5 0 10-.9-2.863z" /> </svg> </span> </div> </div> <span class="Polaris-Text--root Polaris-Text--bodyMd Polaris-Text--regular Polaris-Text--visuallyHidden"> <input type="file" id="" accept="image/*" multiple="multiple" data-paper-dropzone-target="input" data-action="focus->paper-dropzone#onFocus blur->paper-dropzone#onBlur change->paper-dropzone#onChange" /> </span> <template data-paper-dropzone-target="previewTemplate"> <div data-paper-dropzone-target="preview" class="Polaris-DropZone__Preview"> <div class="Polaris-LegacyStack Polaris-LegacyStack--vertical"> <span class="target"></span> </div> </div> </template> <template data-paper-dropzone-target="itemTemplate"> <div class="Polaris-LegacyStack__Item"> <div class="Polaris-LegacyStack Polaris-LegacyStack--alignmentCenter"> <div class="Polaris-LegacyStack__Item"> <span data-target="icon" style="border: none; background: none;" class="Polaris-Thumbnail Polaris-Thumbnail--sizeSmall"> <span class="Polaris-Icon"> <svg viewbox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path d="M17 4a1 1 0 0 1 1 1v13.5a1.5 1.5 0 0 1-1.5 1.5h-13a1.5 1.5 0 0 1-1.5-1.5v-17a1.5 1.5 0 0 1 1.5-1.5h4.5v2h-4v16h12v-13a1 1 0 0 1 1-1z"></path><path d="M8 5v6c0 1.206.799 3 3 3s3-1.794 3-3v-8c0-1.206-.799-3-3-3h-1v2h1c.805 0 .988.55 1 1v7.988c-.012.462-.195 1.012-1 1.012-.805 0-.988-.55-1-1v-6a1 1 0 1 0-2 0z"></path></svg> </span> </span> <span data-target="thumbnail" class="Polaris-Thumbnail Polaris-Thumbnail--sizeSmall"> <img src="#" alt=""> </span> </div> <div class="Polaris-LegacyStack__Item Polaris-LegacyStack__Item--fill"> <div data-target="content"> <p class="Polaris-Text--root Polaris-Text--bodySm Polaris-Text--regular"> <span data-target="file-size" class="Polaris-Text--root Polaris-Text--bodyMd Polaris-Text--subdued Polaris-Text--regular"> SIZE </span> </p> </div> <div data-target="progress-bar" style="margin-top: 4px;" class="Polaris--hidden Polaris-ProgressBar Polaris-ProgressBar--colorHighlight Polaris-ProgressBar--sizeSmall"> <progress class="Polaris-ProgressBar__Progress" value="0" max="100" ></progress> <div style="--pc-progress-bar-duration: 500ms;--pc-progress-bar-percent: 0.0" class="Polaris-ProgressBar__Indicator Polaris-ProgressBar__IndicatorAppearDone"> <span class="Polaris-ProgressBar__Label">0%</span> </div> </div> <div data-target="upload-error" style="margin-top: 4px;" class="Polaris--hidden Polaris-InlineError"> <div class="Polaris-InlineError__Icon"> <span class="Polaris-Icon"> <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 20 20" class="Polaris-Icon__Svg" focusable="false" aria-hidden="true"><path fill-rule="evenodd" d="M11.42 2.588a2.007 2.007 0 0 0-2.84 0l-5.992 5.993a2.007 2.007 0 0 0 0 2.838l5.993 5.993a2.007 2.007 0 0 0 2.838 0l5.993-5.993a2.007 2.007 0 0 0 0-2.838l-5.993-5.993Zm-2.223 4.2a.803.803 0 1 1 1.606 0v3.212a.803.803 0 1 1-1.606 0v-3.211Zm1.606 6.423a.803.803 0 1 1-1.606 0 .803.803 0 0 1 1.606 0Z"></path></svg> </span> </div> File upload failed </div> </div> </div> </div> </template> </div></div>
1
<%= paper_dropzone(accept: 'image/*') %>
Use for cases that accept image file formats.
No params configured.