Content_type and content_size of file before save it

<%= form_tag('URL', :multipart => true) do %>
    <p>
        Video: <%= file_field_tag :avatar %>
    </p>
    <p>
      <%= submit_tag %>
    </p>
<% 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?