# Write File (Upload)

Uploads the `PAWFileData` object to the destination folder in OneDrive or SharePoint. The destination path must be a folder; the file name is taken from the **File.FileName** field.


---

### :arrow_left:**INPUT**

| **Parameter** | **Type** | **Required** | **Description** |
|-----------|------|----------|-------------|
| `ConnectionSettings` | `PAWOffice365ConnectionSettings` | ✅Yes     | OneDrive or SharePoint connection settings |
| `UploadPath` | `String` | ✅Yes     | Destination folder path |
| `File`    | `PAWFileData` | ✅Yes     | File to upload (name + binary) |


---

### :arrow_right:**OUTPUT**

| **Parameter** | **Type** | **Description** |
|-----------|------|-------------|
| `IsOffice365UploadFileSuccessful` | `Boolean` | Operation success status |
| `Office365UploadFileMessage` | `String` | Status/error message |
| `Office365UploadFilePath` | `String` | Path of the uploaded file |


---

### :arrow_down:**MISC**

| **Parameter** | **Type** | **Default** | **Description** |
|-----------|------|---------|-------------|
| `ThrowException` | `Boolean` | ❌No     | Specifies whether an exception is thrown when the operation fails. The default value is "**No**". |