Module: Services::FileUploadHandler
- Included in:
- MdsFilesController
- Defined in:
- app/utils/services/file_upload_handler.rb
Instance Method Summary collapse
Instance Method Details
#clear_temporary_files(hash = params) ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'app/utils/services/file_upload_handler.rb', line 20 def clear_temporary_files(hash=params) return if hash.nil? hash.values.each do |v| if v.is_a?(Hash) clear_temporary_files(v) elsif v.respond_to?(:path) File.unlink(v.path) if File.exists?(v.path) end end end |