xportde Posted October 19, 2020 Share Posted October 19, 2020 How does one enable executables to be uploaded to the File field? Just adding the file extension to the accepted extensions does not seem to work. screenshot attached (ignore the label 'video') Link to comment Share on other sites More sharing options...
Robin S Posted October 19, 2020 Share Posted October 19, 2020 "exe" is among the file extensions that is blocked in WireUpload.php /** * Disallowed extensions for uploaded filenames * * @var array * */ protected $badExtensions = array('php', 'php3', 'phtml', 'exe', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh'); But it turns out you can override this by setting your own custom array of blocked extensions in your /site/config.php // Remove "exe" from array of file extensions blocked by WireUpload $config->uploadBadExtensions = array('php', 'php3', 'phtml', 'cfm', 'shtml', 'asp', 'pl', 'cgi', 'sh'); Of course exe is probably blocked by default for a reason so you would want to do your own research about possible risks involved in allowing such files on your server. 3 Link to comment Share on other sites More sharing options...
xportde Posted October 20, 2020 Author Share Posted October 20, 2020 I will keep that in mind. Thank you Robin ? 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now