Call-for-Code-for-Racial-Justice / Truth-Loop

The Truth-Loop solution helps communities simply understand the policies, regulations and legislation that will impact them the most and allows them to share their experiences around how policies have impacted them or how proposed policies could impact them using short video testimonials.
https://developer.ibm.com/tutorials/truth-loop/
Apache License 2.0
54 stars 29 forks source link

Upload video to server from the client app #177

Open ed-snodgrass opened 3 years ago

ed-snodgrass commented 3 years ago

This will require some interaction with the backend server. Basically, once you've recorded your video there isn't a way to upload it. You can replay it. There may be functionality to do so within the admin application but I can't guarantee that.

markstur commented 3 years ago

the admin UI doesn't have any video upload. The server does have a REST endpoint and Watson Media integration. Also some use of an "uploads" directory for a temporary(?) file storage.

I'm not sure what client was used to test the upload endpoint. Probably postman. I don't remember ever seeing a web page w/ a test upload, but a developer might have used something like that before our current clients were built w/ Vue.js/React.js.

github-actions[bot] commented 2 years ago

:wave: Hi! This issue has been marked stale due to inactivity. If no further activity occurs within the next 7 days, it will automatically be closed.

ed-snodgrass commented 2 years ago

Commenting here too keep this issue open.

github-actions[bot] commented 2 years ago

:wave: Hi! This issue has been marked stale due to inactivity. If no further activity occurs within the next 7 days, it will automatically be closed.

demilolu commented 2 years ago

notes:

demilolu commented 2 years ago

@alexmiller522

ed-snodgrass commented 2 years ago

https://github.com/Call-for-Code-for-Racial-Justice/Truth-Loop/blob/main/client/src/recordRoute/RecordRoute.js

The stopRecording function is responsible for stopping the audio/video recording and updating the state of the app so the user can record another video or watch the video they just recorded. It also calls the onRecordingStopped function where I expect we want to perform the action of saving the file. Or maybe we want a separate button so the user only "Uploads" the videos they are comfortable uploading

markstur commented 2 years ago

share should upload it, cancel should not.

TBD: there could be some reasonable confirmation before sharing or losing a video (on cancel), but just doing a proper share (upload) and cancel (go back w/o upload) would be a good start.

ed-snodgrass commented 2 years ago

My current plan is to add support for uploading to a firebase storage bucket. I'll provide a react component that performs the upload and a "sample" configuration. Eventually supporting multiple storage options (S3 is a likely next option).

I assume we'll want users to authenticate at some point so they can manage their videos and all that. I'll be thinking through ideas on how to associate videos to users without folks being able to identify other users' account ids but that may not be until after I get the base functionality (and documentation in the readme).

I'm also curious if we think we'll need an approval process (one that is transparent to the uploader so that folks can't deny content that they don't agree with).

ed-snodgrass commented 2 years ago

TODOs

github-actions[bot] commented 2 years ago

:wave: Hi! This issue has been marked stale due to inactivity. If no further activity occurs within the next 7 days, it will automatically be closed.

ed-snodgrass commented 2 years ago

Commenting to maybe keep this from going stale. I need to wrap this thing up though. 😬