This time, we'll simply reference an existing file, which means that if we need to create multiple nodes that each need the same file attached, we don't have to upload the same file multiple times (once for each node) and bloat our files directory. We can upload it once, and reference it on the rest.
- Go to “Content => Add content = > Article” (node/add/article)
- Title: Article #4
- Body: (Lorem Ipsum)
- Click "Reference existing"
- Enter "Sample" and choose from the autocomplete list
- Click "Select"
- (Save)
This time, you'll notice that the sample file is the same one that we uploaded before. If we check the files directory, we can confirm that the file is only uploaded once. This is a great way to save file space on your server.
Next, we'll take a look at the "File attach" option which is ideal when dealing with large files.