Denis Pupin (talk | contribs) m (Denis moved page Upload files in Turnkey to Upload/Download files and images in MDriven Turnkey) |
Denis Pupin (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
=== Upload/Download files === | === Upload/Download files === | ||
To upload files into your Turnkey application you should | To upload files into your Turnkey application you should add an attribute with type of Blob to your class in the model. | ||
You can set it in the properties area in MDriven Designer. | You can set it in the attribute properties area in MDriven Designer. | ||
[[File:Attribute BlobType.png|none|thumb| | [[File:Attribute BlobType.png|none|thumb|605x605px|Set the attribute's type and BlobType in attribute proeprties.]] | ||
MDriven Turnkey will render Blob as the upload button component. Text inside the button depends on your ViewColumn name. Don't forget to use '''<MyColumn>_FileName''' and '''<MyColumn>_ContentType''' to save your name and content type of the uploaded file. | MDriven Turnkey will render Blob as the upload button component. Text inside the button depends on your ViewColumn name. Don't forget to use '''<MyColumn>_FileName''' and '''<MyColumn>_ContentType''' to save your name and content type of the uploaded file (Turnkey will use this information to download file correctly). | ||
[[File:Upload | {| class="wikitable" | ||
![[File:Upload file.png|frameless|217x217px]] | |||
[[File:Upload | !Default upload button | ||
[[File: | |- | ||
|[[File:Upload file readonly.png|frameless|235x235px]] | |||
|Readonly state of upload button | |||
To upload images into your Turnkey application you should create an attribute with type of Blob and choose '''BlobType''' – "'''Image'''" in the properties of the attribute. | |- | ||
|[[File:Uploaded file.png|frameless|235x235px]] | |||
|Uploaded state of upload button | |||
|} | |||
To upload images into your Turnkey application you should create an attribute with type of Blob and choose '''BlobType''' – "'''Image'''" in the properties of the attribute. | |||
[[File:Setting BlobType to "Image" in MDriven Designer.png|none|thumb|712x712px|Setting BlobType to "Image" in MDriven Designer]] | [[File:Setting BlobType to "Image" in MDriven Designer.png|none|thumb|712x712px|Setting BlobType to "Image" in MDriven Designer]] | ||
In this case MDriven Turnkey will render it as the default image upload component. | In this case MDriven Turnkey will render it as the default image upload component. |
Revision as of 13:17, 2 December 2020
Upload/Download files
To upload files into your Turnkey application you should add an attribute with type of Blob to your class in the model.
You can set it in the attribute properties area in MDriven Designer.
MDriven Turnkey will render Blob as the upload button component. Text inside the button depends on your ViewColumn name. Don't forget to use <MyColumn>_FileName and <MyColumn>_ContentType to save your name and content type of the uploaded file (Turnkey will use this information to download file correctly).
Default upload button | |
---|---|
Readonly state of upload button | |
Uploaded state of upload button |
To upload images into your Turnkey application you should create an attribute with type of Blob and choose BlobType – "Image" in the properties of the attribute.
In this case MDriven Turnkey will render it as the default image upload component.
To upload an image you need to click on this button and choose the image which you want to upload.
After your image is uploaded you will see it instead of upload button.