---
# System prepended metadata

title: Streetlity Driver APIs

---

# Streetlity Driver APIs

## Upload
Upload files to the server. Upload is a specified API, it requires params in multiple places (`querystring` and `form-data`).

**Path**:`/` 

**Method**: `POST`

**Param**:
<pre>
- f (string) (querystring): name of uploading files
- $name (string) (form-data): uploading file, the name of param is depend on f param.
- utype (int) (optional): determine the upload type
    - 0 (None) : do nothing if the uploading file is existed
    - 1 (Override) : override the old file if this file is existed
    - 2 (Rename) : rename the new file if the old file is existed
</pre>

**Example**:
To upload two file image1.jpg and image2.jpg to the server the request url could be:

`localhost:9003/?f=image1.jpg&f=image2.jpg`

and the `form-data` could contains:

<pre>
image1.jpg: data for image1.jpg
image2.jpg: data for image2.jpg
</pre>

## Download
Download a file on the server

**Path**:`/` 

**Method**: `GET`

**Param**:
<pre>
- f (string): name of the file for downloading
</pre>

**Example**:

To download the file image1.jpg (already exist on the server) the request url could be:

`localhost:9003/?f=image1.jpg`

## Delete
Delete a file on the server

**Path**:`/` 

**Method**: `DELETE`

**Param**:
<pre>
- f (string): name of the file for deleting
</pre>

**Example**:

To delete the file image1.jpg (already exist on the server) the request url could be:

`localhost:9003/?f=image1.jpg`