<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: António Avelar</title>
    <description>The latest articles on DEV Community by António Avelar (@antonioavelar).</description>
    <link>https://dev.to/antonioavelar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F164682%2Faee89b12-0470-465c-9c39-a4b734f86fc4.jpeg</url>
      <title>DEV Community: António Avelar</title>
      <link>https://dev.to/antonioavelar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/antonioavelar"/>
    <language>en</language>
    <item>
      <title>(NodeJS + Express + Multer) Any suggestions of how can i serve user uploaded files?</title>
      <dc:creator>António Avelar</dc:creator>
      <pubDate>Tue, 04 Jun 2019 09:02:47 +0000</pubDate>
      <link>https://dev.to/antonioavelar/nodejs-express-multer-how-can-i-serve-user-uploaded-files-1p4</link>
      <guid>https://dev.to/antonioavelar/nodejs-express-multer-how-can-i-serve-user-uploaded-files-1p4</guid>
      <description>&lt;p&gt;Hi!, i'm building a Web App where a user can upload pictures. For the task of receiving the binary files i'm using Multer.&lt;br&gt;
So... Multer stores the pictures in the filesystem by default without the file extension. I'm storing the file data (original name, mimetype, extension, path, ...) in the database. &lt;/p&gt;

&lt;p&gt;How should i serve those files to the user?&lt;br&gt;
Should i use a route, that gets the image data (extension, mimetype, ...) and then sends the file with the right mime type?&lt;br&gt;
Or should i use the express.static("path/to/folder")?&lt;/p&gt;

</description>
      <category>needhelp</category>
      <category>fileupload</category>
    </item>
  </channel>
</rss>
