Upload/Download files and images in MDriven Turnkey
No edit summary
No edit summary
Line 5: Line 5:
[[File:Attribute BlobType.png|none|thumb|610x610px]]
[[File:Attribute BlobType.png|none|thumb|610x610px]]
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.  
[[File:Upload button component.png|none|thumb|427x427px|Upload button component]]
[[File:Upload button component.png|none|thumb|278x278px|Upload button component]]
Also, you are able to add disabled or readonly expression in MDriven Designer to your upload button component.
Also, you are able to add disabled or readonly expression in MDriven Designer to your upload button component.
[[File:Upload button disabled.png|none|thumb|523x523px|Disabled/ReadOnly state of upload button component]]When you upload your file you will see the progress bar inside the button which will indicate uploading percentage. When uploading is done the button will turn into the green color and file name will place under the button.  
[[File:Upload button disabled.png|none|thumb|284x284px|Disabled/ReadOnly state of upload button component]]When you upload your file you will see the progress bar inside the button which will indicate uploading percentage. When uploading is done the button will turn into the green color and file name will place under the button.  
[[File:Upload success state.png|none|thumb|498x498px|Upload button component success state]]
[[File:Upload success state.png|none|thumb|288x288px|Upload button component success state]]


=== Upload images ===
=== Upload images ===
Line 14: Line 14:
[[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.  
[[File:Image upload component.png|none|thumb|502x502px|Default view of image upload component]]
[[File:Image upload component.png|none|thumb|294x294px|Default view of image upload component]]
To upload an image you need to click on this button and choose the image which you want to upload.
To upload an image you need to click on this button and choose the image which you want to upload.
[[File:Image upload component hover state.png|none|thumb|510x510px]]
[[File:Image upload component hover state.png|none|thumb|296x296px]]
After your image is uploaded you will see it instead of upload button.
After your image is uploaded you will see it instead of upload button.
[[File:Uploaded image.png|none|thumb|515x515px|Uploaded image]]
[[File:Uploaded image.png|none|thumb|299x299px|Uploaded image]]

Revision as of 16:12, 25 November 2020

Upload files

To upload files into your Turnkey application you should create an attribute with type of Blob.

You can set it in the properties area in MDriven Designer.

Attribute BlobType.png

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.

Upload button component

Also, you are able to add disabled or readonly expression in MDriven Designer to your upload button component.

Disabled/ReadOnly state of upload button component

When you upload your file you will see the progress bar inside the button which will indicate uploading percentage. When uploading is done the button will turn into the green color and file name will place under the button.

Upload button component success state

Upload images

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.

Setting BlobType to "Image" in MDriven Designer

In this case MDriven Turnkey will render it as the default image upload component.

Default view of image upload component

To upload an image you need to click on this button and choose the image which you want to upload.

Image upload component hover state.png

After your image is uploaded you will see it instead of upload button.

Uploaded image
This page was edited 35 days ago on 03/26/2024. What links here