Closed Firgrep closed 1 year ago
Devlog:
the next step will be to hook this up with the database, such that when an upload is successful, the details of the file are stored on the model related to the lesson, such that it can be retrieved
Devlog:
The current pattern of the upload mechanism is that when the client submits an upload, a signedPostUrl (with short lifetime) is generated from the server, which is then sent to the front and initiates a fetch requests from the client to the bucket. Any further intereaction with this would mean a second trip to the server. So why not handle everything on the server? In other words, handling file uploads on the server? Let's consider pro and cons.
Handling file uploads on the server:
Handling file uploads on the client:
Happy to discuss this further in more detail (in which case we might want to spawn a seperate issue and keep that as a discussion?).
Functionality added and merged to dev branch-
The idea is to use a bucket (Google Cloud Platform) to store the contents, and for consumption signedUrls will be generated via the app. This makes it so that the content cannot be extracted by link to another place (e.g. users sharing a link to people who haven't purchased the content).