title: Get a download a url from Firebase Storage with Cloud Functions
body: <p>I know there many duplicates which ask similar questions but for the past 2 hours I have tried and surfed the internet for a single line of code has piled my frustration. I am sorry but please help me out. Here is what I have tried up until now, it gives this error:</p>
  <p><strong>Error</strong></p>
  <blockquote>
  <p>38:22  error  Parsing error: Unexpected token firebase</p>
  </blockquote>
  <p><strong>Code</strong></p>
  <pre><code>const functions = require('firebase-functions');
  const admin = require('firebase-admin');
  admin.initializeApp(functions.config().firebase);
  const spawn = require('child-process-promise').spawn;
  const path = require('path');
  const os = require('os');
  const fs = require('fs');
  
  exports.getDownloadUrl = functions.region(&quot;asia-south1&quot;).storage.object().onChange(event =&gt; {
    const object = event.data;
      const fileBucket = object.bucket;
      const filePath = object.name;
      const bucket = gcs.bucket(fileBucket);
      const contentType = object.contentType;
      const resourceState = object.resourceState;
      const tempFilePath = '/test/air.jpg';
  
      return {
        message: await firebase.storage().ref(tempFilePath).getDownloadUrl // line 38
      };
  });
  </code></pre>
  <p>I just want to get a download url from the given file path.</p>