Content_type and content_size of file before save it

<%= form_tag(‘URL’, :multipart => true) do %>


Video: <%= file_field_tag :avatar %>



<%= submit_tag %>


<% end %>

Is there any way to know the content_type and content_size of file
before submit the form and send them as params to the POST request?