timeline-viewer
timeline-viewer copied to clipboard
Firebase uploading v0
trafficstars
Proof of concept for #52
I've played with firebase and here what we got:
- uploading trace to firebase and reading it
- no nice gfycat-style-urls (only filenames in storage), just ugly e.g http://localhost:8833/?loadTimelineFromURL=https%3A%2F%2Ffirebasestorage.googleapis.com%2Fv0%2Fb%2Ftimeline-viewer-94e04.appspot.com%2Fo%2Ftraces%252FChimpanzeeHedgehogMoleScorpionvulgar%3Falt%3Dmedia%26token%3Dbf39fc43-2531-431e-9f27-0328e942c859
- no feature for removing traces from storage after 90days, I suppose it has to be handled by firebase
Functions. (need more investigation)
If we really need to support of response from server in format like
{
raw: 'https://chromedevtools.github.io/traces/CuriousRedCrow',
view: 'https://chromedevtools.github.io/timeline-viewer/?loadTimelineFromURL=https://chromedevtools.github.io/traces/CuriousRedCrow'
}
then I suppose we have to write our own proxy and host it...
P.S. How to setup
- in storage.js append your own config (one more question how to hide it, has it be hidden)
- allow CORS to cloud - https://firebase.google.com/docs/storage/web/download-files?authuser=0, section
CORS Configuration
other then that here is demo