Basic #
This is the most basic usage of RegateFile
.
Regate.RegateFile.init({
id: 'basic-example',
name: 'MagazineCover',
})
@Html.Raw(RegateFile.Build("MagazineCover"))
Value #
With value
property you can set an initial value for your input.
Regate.RegateFile.init({
id: 'value-example',
name: 'MagazineCover',
value: 'magazine.pdf',
})
@Html.Raw(RegateFile.Build("MagazineCover", "magazine.pdf"))
Required #
You can required your field with isRequired
property.
Regate.RegateFile.init({
id: 'required-example',
name: 'MagazineCover',
isRequired: true,
})
@Html.Raw(RegateFile.Build("MagazineCover", isRequired: true))
Uploader #
You can set the URL of your uploader via uploaderUrl
property.
Regate.RegateFile.init({
id: 'uploader-example',
name: 'MagazineCover',
uploaderUrl: '/some/uploader/',
})
@Html.Raw(RegateFile.Build("MagazineCover", uploaderUrl: "/some/uploader/"))
Repository #
You can set the URL of your repository via repositoryUrl
property.
Regate.RegateFile.init({
id: 'repository-example',
name: 'MagazineCover',
repositoryUrl: '/some/repository/',
})
@Html.Raw(RegateFile.Build("MagazineCover", repositoryUrl: "/some/repository/"))