title: Approach to Facebook like post screen with media selection in AngularDart
body: <p>Please note, I'm not asking you to give me a code solution, but I would like to know the best approach, how I can display a preview of images and videos that I have selected with a post, before saving the post.</p>
  
  <p>My relational database would have a post table, that stores the text of the post, and a files table, that stores all the files. The files should be associated with a post.</p>
  
  <p>When I use input type="file" tag, and then select files, I will only get back the file name, not the path where the file is located on the filesystem. The path won't be provided by the browser, due to security reasons. But without knowing, where the selected files are located on the filesystem, I can't display them.</p>
  
  <p>So the only thing I can do, is upload the files first. But the files will not be associated with the post, as the files are uploaded, before I have actually saved the post. So the post does not have an id yet, to which the uploaded images or videos can be associated with.</p>
  
  <p>So what would be the best way, to solve this puzzle? Obviously the best way would be to upload the images, only after the post was saved.</p>
  
  <p>Is there a way in AngularDart, to display a preview of images and videos on the filesystem, and then only upload them, once the post has been saved?</p>
  
  <p>If not, what would be the best approach to this? </p>
  
  <p>The only other option I see is to save an "empty" post, just when it is created to get the id, and then upload the files to the post, that will have an id, because it has been saved already. But that would use much more server side resources and if the user cancels the post, the images will have to be deleted from the server again.</p>
  
  <p>I hope my question makes sense...</p>