Commit Graph

137 Commits

Author SHA1 Message Date
Cameron Cordes
45b4f0cd72 Track relevant .idea files
Some checks failed
Core Repos/ImageApi/pipeline/head Something is wrong with the build of this commit
Core Repos/ImageApi/pipeline/pr-master This commit looks good
2021-02-09 21:32:22 -05:00
Cameron Cordes
b595bdd642 Add VideoStreamManager for keeping track of active streams
The stream manager should help prevent zombie processes and can later be
used for stopping video streams if the user exits the video before
finishing for example.
2021-02-09 21:30:27 -05:00
Cameron Cordes
e4c23c0fe5 Improve video streaming speed
All checks were successful
Core Repos/ImageApi/pipeline/head This commit looks good
Instead of waiting for an entire video to stream, we spawn a child
ffmpeg process to start generating the HLS playlist, and once it creates
the first part of the playlist we return the response so the client can
start streaming almost immediately. HTTP Live streaming can handle
playlist updates after the initial playlist is created, although I don't
think the user can skip to the end and skip streaming parts of the
video.
2021-02-08 19:46:38 -05:00
Cameron Cordes
ecd43f776a Do more proper path validation for playlist generation
All checks were successful
Core Repos/ImageApi/pipeline/head This commit looks good
2021-02-08 18:38:30 -05:00
Cameron Cordes
659bad02c9 Fix clippy warnings
All checks were successful
Core Repos/ImageApi/pipeline/head This commit looks good
2021-02-03 17:21:23 -05:00
e46abbf8ee Jenkins CI (#2)
All checks were successful
Core Repos/ImageApi/pipeline/head This commit looks good
Co-authored-by: Cameron Cordes <cameronc.dev@gmail.com>
Reviewed-on: #2
Co-authored-by: cameron <cameron.cordes@pm.me>
Co-committed-by: cameron <cameron.cordes@pm.me>
2021-02-02 21:24:14 +00:00
Cameron Cordes
f20a8a5842 Update dependencies, disable registration and improve path handling 2021-02-02 13:57:51 -05:00
acad71701e Merge pull request 'Image Upload' (#1) from feature/image-upload into master
Reviewed-on: #1
2020-10-17 23:25:51 +00:00
Cameron Cordes
eccb45ced0 Use Absolutize for files that do not exist
Canonicalize relies on the file existing to resolve the potential
traversal, which won't work for file upload in case the file name has a
traversal inside it.
2020-10-17 19:22:55 -04:00
Cameron Cordes
6c9c80f61d Update dependencies 2020-10-16 14:43:20 -04:00
Cameron Cordes
f52ad9e3b6 Include Nikon Raw image files 2020-09-17 13:29:47 -04:00
Cameron Cordes
d2f7423c6c Fix LFI bug
Previously we blindly read whatever path the client provided and if the
user could read the file it would return from the call.
2020-09-15 16:35:05 -04:00
Cameron Cordes
2343351a4d Add file watcher to re-generate thumbnails
Previously files added while the server is running would not have
thumbnails until after the server was restarted. Now we watch the
BASE_PATH for added/renamed files in order to re-gen the thumbnail.
2020-09-13 21:36:34 -04:00
Cameron Cordes
426c695b47 File upload working 2020-09-13 21:34:08 -04:00
Cameron Cordes
fe23586059 Update to Actix 3.0 2020-09-11 16:12:41 -04:00
Cameron Cordes
c774edd7dd Add Favorite GET, and POST endpoints 2020-08-07 23:11:15 -04:00
Cameron Cordes
74043c5c6a Scan for new files every startup 2020-08-07 23:11:15 -04:00
a300b78fd0 Update 'README.md' 2020-07-30 18:16:23 +00:00
Cameron Cordes
1805c19025 Add README with environment info 2020-07-30 11:01:08 -04:00
Cameron Cordes
f99d574ba2 Read Token signing key from environment 2020-07-30 10:53:27 -04:00
Cameron Cordes
68bb9d9d5c Added tests and better path validation
Secure video endpoints.
2020-07-23 16:18:28 -04:00
Cameron Cordes
f63dd9cb05 Keep thumbnails in their relative directories 2020-07-21 20:36:41 -04:00
Cameron Cordes
7dbd93cedc Generate mp4 thumbnails 2020-07-16 21:24:10 -04:00
Cameron Cordes
a49619c98c Move url to env variable 2020-07-16 20:18:38 -04:00
Cameron Cordes
c90987d709 Check extensions case-invariant
Ran clippy and linted some of the logic.
2020-07-16 20:16:17 -04:00
Cameron Cordes
7d369aab5c Generate thumbnails before API starts up
Clients can now request a thumbnail by specifying a size on the image
request.
2020-07-15 12:06:50 -04:00
Cameron Cordes
ca761f605b Check and use correct paths for generating HLS playlist
This also should prevent generating the playlist if it already exists
and uses a better ffmpeg command for transcoding the video.
2020-07-14 15:45:10 -04:00
Cameron Cordes
c39bf970be Generating a HLS playlist through ffmpeg
I might be able to streamline the requests to cut down on the endpoints.
This also will likely take some time if the file is large and could time
out, that may be a concern for another day.
2020-07-13 22:39:00 -04:00
Cameron Cordes
78c066b7be Update Photos API
Since there is a body to the photos api it should be a post for now.
Also updated the response to separate files and directories.
2020-07-09 18:22:03 -04:00
Cameron Cordes
e0e12dcc7b Remove Environment file 2020-07-08 21:41:22 -04:00
Cameron Cordes
536300e0a1 Serving files is working
Right now we're not doing any streaming and this isn't ideal. I'll need
to figure it out at some point.
2020-07-08 21:38:21 -04:00
Cameron Cordes
82203d9a41 Create Account endpoint works 2020-07-08 09:19:27 -04:00
Cameron Cordes
e3bb607d95 Fix token parsing and require Auth for list files 2020-07-07 22:37:20 -04:00
Cameron Cordes
2aa1b61429 Move database into the main app
I was having issues including the lib as a crate, its fine just being a
module for now.
2020-07-07 21:48:29 -04:00
Cameron Cordes
1c1c8531aa Ignore database files 2020-07-07 21:07:00 -04:00
Cameron Cordes
f8df3678b1 Setup Auth DB 2020-07-07 21:06:43 -04:00
Cameron Cordes
36f7351627 Initial API setup
Right now we are just listing files in a given subdirectory with not
authentication.
2020-07-07 19:53:12 -04:00