luci-base: Make default for FileUpload 'safe' 577/head
authorDaniel Dickinson <openwrt@daniel.thecshore.com>
Wed, 2 Dec 2015 04:02:38 +0000 (23:02 -0500)
committerDaniel Dickinson <openwrt@daniel.thecshore.com>
Wed, 16 Dec 2015 01:36:17 +0000 (20:36 -0500)
Some files and pointers to files are not safe to remove without a replacement
file and config pointing to the file.  For instance for uhttpd application in
the works, removing the certificate or key config or files without having the
replacements in places renders the WeUI inaccessible.

The only other place where FileUpload is currently used is for wifi certificates
for which the 'safe' handling is also preferred.  Therefore make the default for
the FileUpload widget the safe handling and add a property self.unsafeupload that
allows for the old unsafe handling should it prove useful in some case.

Also allow to specify a file already on router instead of uploading a file.

Signed-off By: Daniel Dickinson <openwrt@daniel.thecshore.com>


No differences found