timeline-viewer icon indicating copy to clipboard operation
timeline-viewer copied to clipboard

Firebase uploading v0

Open denar90 opened this issue 7 years ago • 1 comments
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

  1. in storage.js append your own config (one more question how to hide it, has it be hidden)
  2. allow CORS to cloud - https://firebase.google.com/docs/storage/web/download-files?authuser=0, section CORS Configuration

denar90 avatar Jun 13 '18 21:06 denar90

other then that here is demo

denar90 avatar Jun 13 '18 21:06 denar90