Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
examples:builder:singe_attachment [2020/09/15 10:11] orville [Single media/file attachment: attachOne] |
examples:builder:singe_attachment [2021/12/09 10:56] (current) pdsci-admin |
||
---|---|---|---|
Line 2: | Line 2: | ||
====== Single media/file attachment: attachOne ====== | ====== Single media/file attachment: attachOne ====== | ||
- | With the // | + | With the // |
<WRAP tip> | <WRAP tip> | ||
Line 8: | Line 8: | ||
* Add code to model: public $attachOne = [' | * Add code to model: public $attachOne = [' | ||
* Add new //file upload// widget to the backend form with ' | * Add new //file upload// widget to the backend form with ' | ||
- | * Set allowed file extensions, width and height of image (if image files) | + | * Set at least allowed file extensions, width and height of image (if image files) |
</ | </ | ||
Line 21: | Line 21: | ||
Prerequisites are\\ | Prerequisites are\\ | ||
* an installed [[https:// | * an installed [[https:// | ||
- | * any source code editor or e.g. the [[https:// | + | * any source code editor or e.g. the [[https:// |
* a database table for records to attach the media to | * a database table for records to attach the media to | ||
* a form (at least in backend) to display the media | * a form (at least in backend) to display the media | ||
Line 64: | Line 64: | ||
Finally, in the backend form view of the plugin, a file can be uploaded by clicking on the //file upload symbol// - the area below the 'Cover Image' title in the example:\\ | Finally, in the backend form view of the plugin, a file can be uploaded by clicking on the //file upload symbol// - the area below the 'Cover Image' title in the example:\\ | ||
{{: | {{: | ||
+ | <WRAP clear /> | ||
\\ | \\ | ||
+ | Now the form is ready to attach images and/or files to each record.\\ | ||
+ | ---- | ||
\\ | \\ | ||
- | + | Back to [[: | |
- | ---- | + | |