If you like DNray Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Storing media files

Started by maja, Oct 27, 2022, 01:27 AM

Previous topic - Next topic

majaTopic starter

When building a website, one question that arises is where to store the uploaded files such as pictures, videos, and audios for displaying to the users. Initially, I thought of storing them in the same place as the site, on a cloud server, but this option comes with limited storage and high costs. The cloud server's storage is usually intended for website hosting, not for file storage. Additionally, access restrictions may apply if excessive manipulations of the files occur.

Another option I considered was S3, which offers vast storage space. However, two problems arise with this option. First, they can automatically debit money from the card, which seems peculiar. Second, issues arise with the file distribution, not their size. The number of GET requests significantly affects the amount of money that S3 can debit. If millions of GET requests occur, then I may owe S3 hundreds of dollars, which is a considerable sum of money that I cannot afford.

However, many sites successfully distribute files using this option, so there must be a way to do it correctly. Another alternative is to purchase a cheap NAS and host it at home since the website may not attract many visitors. Although pitfalls exist, it's possible to get a static IP from the provider.

In summary, determining where and how to store media files for a website requires careful consideration of each option's advantages and disadvantages.
  •  


jeromebunker

When considering web site storage, you can select hosting or VPS depending on your software and file management requirements. Hetzner offers affordable additional storage solutions to supplement your chosen option.

In the past, limited personal computer memory led to the development of various formats and compression methods for accommodating vast amounts of data. By using proper compression techniques, significantly more information could fit within the available space.
  •  

jobtardis

Amazon S3 is an online file hosting service offered by Amazon Web Services that provides users with the capacity to store and retrieve any amount of data from anywhere on the network. I have used this service for more than a year and a half as a backup option in case of issues with another service that I will describe later.

By registering, you can create your directory structure and store an unlimited number of files with the added advantage of controlling access privileges.

However, some disadvantages exist for Russian-speaking users, such as the interface being entirely in English with no option to change the language. Additionally, usage requires a dollar card, and Amazon charges monthly fees for using the S3 service. Furthermore, due to its focus on Western countries, prices may be comparatively high.

Small amounts of infrequently accessed information are well-suited to this service, but it is not advisable to store large, frequently accessed files there as the monthly charges can quickly accumulate
  •  

rozepeter

Yes, you've raised some valid points regarding the storage of media files for a website. Choosing the right storage option depends on your specific needs and budget. Let's discuss the pros and cons of each option you mentioned.

Storing files on a cloud server designed for website hosting may not be the most cost-effective solution, especially if storage space is limited and costs are high. Additionally, access restrictions can pose challenges when dealing with heavy file manipulations.

Using S3 (Simple Storage Service) can provide vast storage space, but there are a couple of concerns. First, S3 automatically debits money from your card because it is a pay-as-you-go service. This might seem unusual, but it allows for flexibility and scalability. Second, the cost of GET requests can add up if there are millions of them, which could result in substantial charges. However, by optimizing your website's design and using caching techniques effectively, you can minimize the number of GET requests and mitigate these costs.

Hosting a NAS (Network Attached Storage) at home is another alternative, especially if your website doesn't attract a significant number of visitors. It allows you to have full control over your storage and avoids potential costs associated with cloud services. However, keep in mind that hosting a server at home requires reliable internet connections, hardware management, and security considerations.

Here are a few more considerations when it comes to storing media files for a website:

1. Content Delivery Networks (CDNs): CDNs are specialized networks designed to efficiently distribute static content, including media files, across multiple servers worldwide. They offer high-speed delivery to users by caching content in various geographical locations. CDNs can help reduce latency and bandwidth costs while improving the overall performance of your website.

2. Third-party file hosting services: Instead of managing storage yourself, you can consider utilizing third-party file hosting services like Dropbox, Google Drive, or Amazon S3 Transfer Acceleration. These services typically offer scalable storage solutions, ease of integration, and various pricing plans depending on your needs.

3. Compression and optimization: Before storing media files, it's crucial to optimize them for web delivery. Compressing images, videos, and audio files reduces file size and improves loading times. There are numerous tools available that can automatically compress and optimize media files without significantly compromising quality.

4. Database storage: Instead of storing files directly on the file system, you can choose to store the file metadata (e.g., file name, size, type) in a database, while physically storing the files in a designated location. This approach allows for better organization, searchability, and easier management of files.

5. Scalability and future growth: When deciding on a storage solution, think about the scalability and future growth of your website. Consider how easily you can expand your storage capacity, handle increased traffic, and manage the costs associated with additional storage requirements or usage spikes.

more considerations when it comes to storing media files for a website:

1. Security: Ensure that whichever storage option you choose offers appropriate security measures to protect your media files. This includes encryption, access controls, backups, and monitoring features. Consider the sensitivity of your media files and select a storage solution that aligns with your security requirements.

2. Content management systems (CMS): If you're using a CMS like WordPress, Joomla, or Drupal, they often have built-in media management systems. These systems provide capabilities for organizing, storing, and displaying media files directly within the CMS environment, simplifying the process and integration with your website.

3. Serving static files vs. dynamic files: Differentiate between static files (e.g., images, videos) that rarely change and dynamic files (e.g., user-generated content) that frequently update. Static files can be efficiently stored and cached, while dynamic files may require a more robust storage and retrieval mechanism.

4. Backup and disaster recovery: Implement a comprehensive backup strategy to ensure the safety of your media files. Regularly back up your files to a separate location or use tools that offer automated backup solutions. In the event of data loss or disaster, having reliable backups will be crucial.

5. Content ownership and legal considerations: Be aware of copyright issues and ensure you have the necessary rights or permissions to store and display the media files on your website. Respect intellectual property laws and establish policies for user-generated content to comply with legal obligations.

6. User experience and performance: Consider the impact of file storage on user experience and website performance. Optimize image sizes, implement lazy loading techniques, or use thumbnail generation to improve page load times and overall website responsiveness.
  •  

billyfrederi

Cloud servers are a total rip-off for media—overpriced and underpowered for your stash. S3 is the obvious play, but if you're whining about GET request fees, maybe code smarter and cache stuff with a CDN instead of letting your app choke on requests.

A home NAS? Are you for real? That's a dumpster fire waiting to happen with zero scalability and sketchy uptime. Get with the program - leverage S3, slap on Cloudfront, and quit playing with toy setups before your site flatlines.
  •  


If you like DNray forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...