imgnx
imgnx

Reputation: 789

When storing a User-Uploaded video file (such as .mp4) for a Rails (or PHP, ect.) CMS, how should I store the file?

Imagine I'm trying to start up a YouTube-style content management system (with Rails, PHP, or some other similar language or system) in which users can upload videos to my website (for others to view):

Should I store the file in a directory on the server or should I store the file in a database (or both)?

Should I do this in Ruby on Rails, PHP, or some other type of language?

Best practices?

Upvotes: 0

Views: 40

Answers (1)

Nikko Madrelijos
Nikko Madrelijos

Reputation: 545

Store the file in a directory then store the filename/path in the database.

You could also consider using the cloud for storing these large files.

You could do that in images, documents, or any other files. That way, your database loads faster.

Upvotes: 1

Related Questions