HTML input type file shorten filename
<p>I was wondering is there a way to manipulate the size of the filename when using <code>&lt;input type="file"&gt;</code></p>

<p>Say for instance i have a file named:</p>

<blockquote>
  <p>iamaverylongtextthatwilldestoryyourcssbecauseidontknowwhattocallmyfiles.txt</p>
</blockquote>

<p>When using this in a browser window that is small will move buttons and other <code>html</code> tags</p>

<p>So if there was a way to shorten this so it takes the first 5 characters of the filename and then adds the file extension. Here is a picture of what I mean:</p>

<p><a href="https://i.stack.imgur.com/JNNuX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JNNuX.png" alt="enter image description here"></a></p>