# openapi.api.ImagesApi

## Load the API package
```dart
import 'package:openapi/api.dart';
```

All URIs are relative to *http://localhost*

Method | HTTP request | Description
------------- | ------------- | -------------
[**delete**](ImagesApi.md#delete) | **DELETE** /api/aws/s3/delete | Delete a file from S3
[**upload**](ImagesApi.md#upload) | **POST** /api/aws/s3/upload | Upload a file to S3


# **delete**
> OkRes delete(deleteImageBody)

Delete a file from S3

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getImagesApi();
final DeleteImageBody deleteImageBody = ; // DeleteImageBody | 

try {
    final response = api.delete(deleteImageBody);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ImagesApi->delete: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **deleteImageBody** | [**DeleteImageBody**](DeleteImageBody.md)|  | 

### Return type

[**OkRes**](OkRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **upload**
> UploadImageRes upload(file, path, isProductImage, productId)

Upload a file to S3

### Example
```dart
import 'package:openapi/api.dart';

final api = Openapi().getImagesApi();
final MultipartFile file = BINARY_DATA_HERE; // MultipartFile | File to be uploaded
final String path = path_example; // String | 
final bool isProductImage = true; // bool | 
final num productId = 8.14; // num | 

try {
    final response = api.upload(file, path, isProductImage, productId);
    print(response);
} catch on DioError (e) {
    print('Exception when calling ImagesApi->upload: $e\n');
}
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **file** | **MultipartFile**| File to be uploaded | 
 **path** | **String**|  | [optional] 
 **isProductImage** | **bool**|  | [optional] 
 **productId** | **num**|  | [optional] 

### Return type

[**UploadImageRes**](UploadImageRes.md)

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

