-
Notifications
You must be signed in to change notification settings - Fork 81
Expand file tree
/
Copy pathFileUploader.xml
More file actions
237 lines (237 loc) · 13.7 KB
/
Copy pathFileUploader.xml
File metadata and controls
237 lines (237 loc) · 13.7 KB
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<?xml version="1.0" encoding="utf-8" ?>
<widget id="com.mendix.widget.web.fileuploader.FileUploader" pluginWidget="true" needsEntityContext="true" offlineCapable="true" supportedPlatform="Web" xmlns="http://www.mendix.com/widget/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mendix.com/widget/1.0/ ../node_modules/mendix/custom_widget.xsd">
<name>File uploader</name>
<description />
<studioProCategory>Images, videos & files</studioProCategory>
<studioCategory>Images, Videos & Files</studioCategory>
<icon />
<properties>
<propertyGroup caption="General">
<property key="uploadMode" type="enumeration" defaultValue="files">
<caption>Upload mode</caption>
<description />
<enumerationValues>
<enumerationValue key="files">Files</enumerationValue>
<enumerationValue key="images">Images</enumerationValue>
</enumerationValues>
</property>
<property key="associatedFiles" type="datasource" isList="true" defaultType="Association" defaultValue="FileUploader.FileUploadContext/FileUploader.UploadedFile_FileUploadContext/FileUploader.UploadedFile">
<caption>Associated files</caption>
<description />
</property>
<property key="associatedImages" type="datasource" isList="true" defaultType="Association" defaultValue="FileUploader.FileUploadContext/FileUploader.UploadedImage_FileUploadContext/FileUploader.UploadedImage">
<caption>Associated images</caption>
<description />
</property>
<property key="readOnlyMode" type="boolean" defaultValue="false">
<caption>Read-only mode</caption>
<description />
</property>
<property key="createFileAction" type="action" defaultValue="FileUploader.ACT_CreateUploadedFileDocument" defaultType="CallNanoflow">
<caption>Action to create new files</caption>
<description>Nanoflow that creates a file object, associates it to the current object and commits it.</description>
</property>
<property key="createImageAction" type="action" defaultValue="FileUploader.ACT_CreateUploadedImageDocument" defaultType="CallNanoflow">
<caption>Action to create new images</caption>
<description>Nanoflow that creates an image object, associates it to the current object and commits it.</description>
</property>
<property key="allowedFileFormats" type="object" isList="true" required="false">
<caption>Allowed file formats</caption>
<description>No restrictions if left empty.</description>
<properties>
<propertyGroup caption="General">
<property key="configMode" type="enumeration" defaultValue="simple">
<caption>Configuration mode</caption>
<description />
<enumerationValues>
<enumerationValue key="simple">Simple</enumerationValue>
<enumerationValue key="advanced">Advanced</enumerationValue>
</enumerationValues>
</property>
<property key="predefinedType" type="enumeration" defaultValue="pdfFile">
<caption>Predefined type</caption>
<description />
<enumerationValues>
<enumerationValue key="pdfFile">PDF Document (.pdf)</enumerationValue>
<enumerationValue key="msWordFile">Microsoft Word (.doc and .docx)</enumerationValue>
<enumerationValue key="msExcelFile">Microsoft Excel (.xls and .xlsx)</enumerationValue>
<enumerationValue key="msPowerPointFile">Microsoft PowerPoint (.ppt and .pptx)</enumerationValue>
<enumerationValue key="plainTextFile">Plain Text (.txt)</enumerationValue>
<enumerationValue key="csvFile">CSV (.csv)</enumerationValue>
<enumerationValue key="zipArchiveFile">Zip archive</enumerationValue>
<enumerationValue key="anyTextFile">Text file</enumerationValue>
<enumerationValue key="anyImageFile">Image</enumerationValue>
<enumerationValue key="anyAudioFile">Audio</enumerationValue>
<enumerationValue key="anyVideoFile">Video</enumerationValue>
</enumerationValues>
</property>
<property key="mimeType" type="string" required="false">
<caption>Mime Type</caption>
<description>For example 'image/jpeg' or 'application/pdf'</description>
</property>
<property key="extensions" type="string" required="false">
<caption>Extensions list</caption>
<description>Comma separated list of extensions. For example: '.jpg,.jpeg'.</description>
</property>
<property key="typeFormatDescription" type="textTemplate">
<caption>Type description</caption>
<description>Shown to the end users to describe supported file types.</description>
</property>
</propertyGroup>
</properties>
</property>
<property key="maxFilesPerUpload" type="expression" defaultValue="10">
<caption>Maximum number of files</caption>
<description>Limit the number of files per upload.</description>
<returnType type="Integer" />
</property>
<property key="maxFileSize" type="integer" defaultValue="25">
<caption>Maximum file size (MB)</caption>
<description>Reject files that are bigger than specified size.</description>
</property>
</propertyGroup>
<propertyGroup caption="Texts">
<property key="dropzoneIdleMessage" type="textTemplate">
<caption>Dropzone message</caption>
<description />
<translations>
<translation lang="en_US">Drag and drop files here</translation>
</translations>
</property>
<property key="dropzoneAcceptedMessage" type="textTemplate">
<caption>Dropzone hover for uploadable files</caption>
<description />
<translations>
<translation lang="en_US">All files can be uploaded.</translation>
</translations>
</property>
<property key="dropzoneRejectedMessage" type="textTemplate">
<caption>Dropzone hover for non uploadable files</caption>
<description />
<translations>
<translation lang="en_US">Some files may not be uploadable.</translation>
</translations>
</property>
<property key="uploadInProgressMessage" type="textTemplate">
<caption>Uploading in progress</caption>
<description />
<translations>
<translation lang="en_US">Uploading...</translation>
</translations>
</property>
<property key="uploadSuccessMessage" type="textTemplate">
<caption>Uploading success</caption>
<description />
<translations>
<translation lang="en_US">Uploaded successfully.</translation>
</translations>
</property>
<property key="uploadFailureGenericMessage" type="textTemplate">
<caption>Uploading unknown error</caption>
<description />
<translations>
<translation lang="en_US">An error occurred during uploading.</translation>
</translations>
</property>
<property key="uploadFailureInvalidFileFormatMessage" type="textTemplate">
<caption>Invalid file format</caption>
<description />
<translations>
<translation lang="en_US">File format is not supported, supported formats are ###.</translation>
</translations>
</property>
<property key="uploadFailureFileIsTooBigMessage" type="textTemplate">
<caption>File is too big</caption>
<description />
<translations>
<translation lang="en_US">File size exceeds the maximum limit of ### megabytes.</translation>
</translations>
</property>
<property key="uploadFailureTooManyFilesMessage" type="textTemplate">
<caption>Too many files</caption>
<description />
<translations>
<translation lang="en_US">Too many files added. Only ### files per upload are allowed.</translation>
</translations>
</property>
<property key="unavailableCreateActionMessage" type="textTemplate">
<caption>Action to create new files is not available or failed</caption>
<description />
<translations>
<translation lang="en_US">Can't upload files at this time. Please contact your system administrator.</translation>
</translations>
</property>
<property key="downloadButtonTextMessage" type="textTemplate">
<caption>Download button</caption>
<description />
<translations>
<translation lang="en_US">Download this file</translation>
</translations>
</property>
<property key="removeButtonTextMessage" type="textTemplate">
<caption>Remove button</caption>
<description />
<translations>
<translation lang="en_US">Remove this file</translation>
</translations>
</property>
<property key="removeSuccessMessage" type="textTemplate">
<caption>File removal success</caption>
<description />
<translations>
<translation lang="en_US">Removed successfully.</translation>
</translations>
</property>
<property key="removeErrorMessage" type="textTemplate">
<caption>File removal failure</caption>
<description />
<translations>
<translation lang="en_US">An error occurred while removing this file.</translation>
</translations>
</property>
</propertyGroup>
<propertyGroup caption="Advanced">
<property key="objectCreationTimeout" type="integer" defaultValue="10">
<caption>Object creation timeout</caption>
<description>Consider uploads unsuccessful if the Action to create new files/images does not create new objects within the configured amount of seconds.</description>
</property>
<property key="enableCustomButtons" type="boolean" defaultValue="false">
<caption>Enable custom buttons</caption>
<description />
</property>
<property key="customButtons" type="object" isList="true" required="false">
<caption>Custom buttons</caption>
<description />
<properties>
<propertyGroup caption="General">
<property key="buttonCaption" type="textTemplate">
<caption>Caption</caption>
<description />
</property>
<property key="buttonIcon" type="icon">
<caption>Icon</caption>
<description />
</property>
<property key="buttonActionFile" type="action" dataSource="../associatedFiles">
<caption>Action</caption>
<description />
</property>
<property key="buttonActionImage" type="action" dataSource="../associatedImages">
<caption>Action</caption>
<description />
</property>
<property key="buttonIsDefault" type="boolean" defaultValue="false">
<caption>Default file action</caption>
<description>When set to Yes, the action will be triggered by clicking on the file entry.</description>
</property>
<property key="buttonIsVisible" type="expression" defaultValue="true">
<caption>Visible</caption>
<description>The button will be hidden when false is returned.</description>
<returnType type="Boolean" />
</property>
</propertyGroup>
</properties>
</property>
</propertyGroup>
</properties>
</widget>