@@ -5,40 +5,41 @@ elevatedevdesign:autoform-slingshot
55
66## Config
77
8- type: String,
9- autoform: {
10- type: "slingshot",
11- multi: true, // defaults to true, meta setting, changes defaults
12- ui: {
13- hideList: true,
14- hideIcons: true,
15- noPreview: true,
16- hideDownload: true,
17- multipleUpload // only applies to file chooser
18- }
19- slingshot: {
20- downloadUrl( data ) // for download btn and preview, should return err, resp { src: 'downloadUrl'}
21- replaceOnChange
22- directives: [
23- {
24- name: "Files",
25- onBeforeUpload: function(){}
8+ type: afSlingshot.fileSchema,
9+ autoform: {
10+ type: "slingshot",
11+ multi: true, // defaults to true, meta setting, changes defaults
12+ ui: {
13+ hideList: true,
14+ hideIcons: true,
15+ noPreview: true,
16+ hideDownload: true,
17+ multipleUpload // only applies to file chooser
2618 }
27- ]
28- }
29- }
19+ slingshot: {
20+ downloadUrl( data ) // for download btn and preview, should return err, resp { src: 'downloadUrl'}
21+ replaceOnChange
22+ directives: [
23+ {
24+ name: "Files",
25+ onBeforeUpload: function(){}
26+ }
27+ ]
28+ }
29+ }
30+
31+ Type can also be
3032
31- // NOTICE! These are required for type: [ Object] .
32- 'file.key': { type: String },
33- 'file.filename': { type: String },
34- 'file.src': { type: String },
35- 'file.directive': { type: String },
36- 'file.type': { type: String }
33+ * ` String `
34+ * ` [afSlingshot.fileSchema] `
3735
38- ## Icons
39- Icons are set via CSS.
4036
4137## TODO
42- Show errors
43- Add tests
44- Invert data structure. Currently uploader -> file info, make it file -> attached uploader
38+ * The big one - Show errors
39+ * Correctly stop uploads that are removed
40+ * Add Remove button for multi = false type
41+ * i18n support
42+ * Support for more than just bootstrap and plain
43+ * Better icon support for non-images
44+ * Detect when a previously saved file is an image (currently only on recent uploads)
45+ * Add more tests
0 commit comments