# Generating signed URL for a file download

### Code: /lessons/Generating\_signed\_URL\_for\_a\_file\_download

In this example, the function code accepts the bucketName and the sourceFilePath as input parameters. It fetches the signed URL link which can be used to download the file.

**Prerequisite**&#x20;

The same file as the one used in the previous example .

**Steps**

1. Create a new function called GeneratingSignedUrl.java.
2. Upload a file to the GCS bucket.
3. Set passed parameters as the name of the bucket and file path.
4. Call StorageApi.getSignedUrl function with the above parameters.
5. Return the signed URL response in the form of a Result.

<br>
