Problem with videos in the course module

Thursday, April 18, 2024 9:25:23 PM
  • Posted: Monday, October 11, 2021 7:59 AM
  • 6
Hi,
when I upload video files in the courses module in the MongoDB database, "Download" -> fs.files and then in the fs.chunks table program add binary data split to maximum MongoDb size. I have a few questions related to this process and logic:

1. In the administrator panel, I can change the files to be stored in the file system and not in the database. Does this not apply to the course module files?
2. After removing the video file from the lesson, the whole lesson, or even the entire course, the entries in the fs.files and fs.chunks tables remain. Which, with a large number of videos files, can be problematic. Is this a problem where I will have to write supervisor or a plugin that cleans the database from unnecessary binary data? Is there any scheduler that monitors and cleans tables?

Best regards
Michael
0
  • Posted: Monday, October 11, 2021 8:49 AM
  • 953
According to the first question, setting in the Media settings is used only for pictures, they will appear in the wwwroot folder, to be publicly available. In the case of videos used in courses, if you make them stored in the file system, you will make them available without purchasing products. I suppose it won't be expected behavior for you.

In the case of second question, I think it's a default behavior of GridFS in MongoDB, and every operation inside should be done by a database administrator directly in the database. We don't interfere in it by the application.
Best regards,
Patryk

GrandNode Team
0
  • Posted: Monday, October 11, 2021 9:12 AM
  • 6
saving to the file system does not have to be a wwwroot folder. Files can be stored in a dedicated folder for courses with aappool or www-data write read permission. It is then streamed through the controller to the end user. As for the second part, I disagree. MongoDB is a non-relational database and it is a big mistake to leave unnecessary large binary data like video files in tables.
0
  • Posted: Monday, October 11, 2021 9:19 AM
  • 953
WebArgo wrote:
saving to the file system does not have to be a wwwroot folder. Files can be stored in a dedicated folder for courses with aappool or www-data write read permission. It is then streamed through the controller to the end user. As for the second part, I disagree. MongoDB is a non-relational database and it is a big mistake to leave unnecessary large binary data like video files in tables.


Yes, and no :) It has to be wwwroot folder because it is how it's done now. We don't have a plan to modify this functionality now.

In the case of GridFS, you're right. We made some additional research and internal analysis, and we definitely should handle it during the "Delete" operation. I've made a task for developers here, we will try to implement it in the incoming version.  
Best regards,
Patryk

GrandNode Team
0
  • Posted: Monday, October 11, 2021 9:29 AM
  • 6
Thanks you for the quick reply.
0
back to top
Filters