title: Pass File object to background.js from content script or pass createObjectURL (and keep alive after refresh)
body: <p>My goal is to upload a file in the background task with a file coming from the content script.</p>
  
  <p>I figured it's not possible to pass a File object directly from content script to the background because <code>chrome.runtime.sendMessage</code> JSON serialize the data.</p>
  
  <p>It's possible to pass a string url to the file with <code>URL.createObjectURL</code>, which works. But the URL is tied to the document in the window on which it was created (current tab content script). If I refresh, navigates away, close the tab those urls are destroyed.</p>
  
  <p>Read the entire file with FileReader and keep in memory is not an option because it'll crash the extension on large files.</p>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li>Keep the <code>URL.createObjectURL</code> alive?</li>
  <li>Pass File object to background?</li>
  <li>Upload a file in the background task with a file from the content script?</li>
  <li>Pass file link to popup and submit form there, which then run in background?</li>
  </ol>