Commit graph

14 commits

Author SHA1 Message Date
Gabriel Simmer 9cd7ab75e8
Better error messages for Backblaze, int64.
Ran into an issue when running on a Raspberry Pi - occaisonally, the
int size for the files being provided from Backblaze (which is in
bytes) will be too large. This is fixed by upgrading the int to int64.
As a part of this debugging process, I upgraded the error handling when
fetching the Backblaze file listing to actually print the errors rather
than failing silently.
2020-03-23 10:53:58 +00:00
Gabriel Simmer 49dba732d3
Implement Setup() function for providers, cleanup
Implemented a much-needed Setup() function for providers to implement,
which (as demonstrated in the backblaze provider) allows for
authentication in advance of needing to make calls to remote locations.
This could also be used to create a directory or perform some other
sanity check required for the provider to work. So far, haven't noticed
any performance impacts from this approach, besides not needing to auth
each time we make a request.
2020-03-21 00:31:24 +00:00
Gabriel Simmer c2171d00c9
io.Copy rather than ioutil.ReadAll
Should offer some speed boost, copying the file contents rather than
reading it all to memory then writing it back out. Should theoretically
be able to handle larger files as well, although some benchmarks
are TBD around filesize limits.
2020-03-19 10:13:38 +00:00
Gabriel Simmer ea1075cb5b
Rewrite file provider to proxy data download (rather than redirect)
Reworked the fileprovider to proxy data directly from the provider
rather than attempt to funkily redirect when needed, since it was overly
complex and wouldn't work well in the long run. Temporarily added "file"
as constant return for determining the filetype through Backblaze.

Added a Makefile to make life easier as well, and rewrote the README to
reflect the refactor/rewrite and new approach to providers.
2020-03-15 23:49:00 +00:00
Gabriel Simmer bf1f06b79c Refactoring file storage to enable different providers
Expanding this as we go, currently have POC Backblaze B2 support and
basic 'disk' provider as well. Still WIP, but functional for the most
part. Also moving to simplified YAML configuration.

Overall, simplifying things to be extensible down the line. Still work
to be done, but coming along nicely.
2020-02-24 18:07:47 +00:00
Gabriel Simmer 6524726357 Directory listing in new frontend 2019-07-27 21:43:05 -07:00
Gabriel Simmer 9ab5f248a9 Rewriting frontend in react, refactoring of routes. 2019-07-13 20:19:28 -07:00
Gabriel Simmer 88e0d6c7b1
Add disk usage statistics to index & API.
Update README.md

Add disk usage statistics to index & API.
2019-04-01 22:45:33 -07:00
Gabriel Simmer a2a1e0e573
Begin work on API, decouple frontend to be more dynamic. 2019-03-02 17:41:13 -08:00
Gabriel Simmer 8b49d75077
Fix bug where file upload location was not respected. 2019-02-24 14:53:55 -08:00
Gabriel Simmer 23177b6b54
Implement basic file uploading ('hot' tier only) 2019-02-24 14:42:21 -08:00
Gabriel Simmer f9023d0c4d
Use common readandservefile function (can handle large files) 2019-02-24 11:16:40 -08:00
Gabriel Simmer 4bd60c6c1d
Add basic styling to listing page, fix previous directory link. 2019-02-24 01:02:03 -08:00
Gabriel Simmer 7b091438d4
Initial commit of basic functional file listing 2019-02-24 00:25:39 -08:00