I have a bunch of modules that have broken features in new miva stores because cloudflare blocks all binary uploads to anything but admin.mvc by default. Images, pdfs, zips, etc...
Not only does it break upload functionality in my modules, it breaks upload functionality for store clients who require uploads as part of the order process. Tax deferred forms, pdfs and image and zips for design uploads, all broken in new stores.
The perfect solution would be to automatically whitelist all .mvc files found in the /modules/ directory tree.
If that isn't an option, there is another simple solution.
Make admin.mvc (or some new .mvc file) the global upload endpoint and if there is a url parm like
admin.mvc?module_code=some_module_code
then admin.mvc calls the equivalent validate/process file upload functions from the module referred to by g.module_code and passes everything off to the module.
Worried about valid extensions or max file size? Add a new module API function/feature called mivaFileUploadSettings(...) in the module that admin.mvc endpoint calls to get that kind of information.
Or something.
Customers need to be able to have their custom modules handle any kinds of uploads they want regardless of cloudflare thinks. I have half a dozen customers crawling down my neck about this and it's taken a month just to figure out it's because of cloudflare.
Not only does it break upload functionality in my modules, it breaks upload functionality for store clients who require uploads as part of the order process. Tax deferred forms, pdfs and image and zips for design uploads, all broken in new stores.
The perfect solution would be to automatically whitelist all .mvc files found in the /modules/ directory tree.
If that isn't an option, there is another simple solution.
Make admin.mvc (or some new .mvc file) the global upload endpoint and if there is a url parm like
admin.mvc?module_code=some_module_code
then admin.mvc calls the equivalent validate/process file upload functions from the module referred to by g.module_code and passes everything off to the module.
Worried about valid extensions or max file size? Add a new module API function/feature called mivaFileUploadSettings(...) in the module that admin.mvc endpoint calls to get that kind of information.
Or something.
Customers need to be able to have their custom modules handle any kinds of uploads they want regardless of cloudflare thinks. I have half a dozen customers crawling down my neck about this and it's taken a month just to figure out it's because of cloudflare.