<commit_before>---
layout: post
title: Sending file as data in jquery ajax
---

Recently I was working on a project where I needed to upload a file in a single page application, so form submission was out of the question.

![_config.yml]({{ site.baseurl }}/images/whatif.jpg)
<commit_msg>testing code highlight<commit_after>---
layout: post
title: Sending file as data in jquery ajax
---

Recently I was working on a project where I needed to upload a file in a single page application, so form submission was out of the question.

![_config.yml]({{ site.baseurl }}/images/whatif.jpg)


#### testing code hightlight
{% highlight ruby %}  
def foo  
  puts 'foo'  
end  
{% endhighlight %}
{'fraction_non_alphanumeric': 0.09883720930232558, 'fraction_numerical': 0.0, 'mean_word_length': 3.852112676056338, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2347197', 'n_tokens_mistral': 212, 'n_tokens_neox': 195, 'n_words': 95}