I am making a logging system which keeps track of all the request the web server is getting. How do I check if any of the requests contain any file i.e. any file upload action?
Maybe check what is your request mime type.
request.content_mime_type.symbol
=> :multipart_form
If that returns :multipart_form you can go through the params values and search for kind of ActionDispatch::Http::UploadedFile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With