All URIs are relative to https://api.aerostack.dev/v1
| Method | HTTP request | Description |
|---|---|---|
| StorageUpload | Post /storage/upload | Upload file to storage |
StorageUpload200Response StorageUpload(ctx).File(file).Key(key).ContentType(contentType).Execute()
Upload file to storage
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func main() {
file := os.NewFile(1234, "some_file") // *os.File |
key := "key_example" // string | Storage key/path
contentType := "contentType_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.StorageAPI.StorageUpload(context.Background()).File(file).Key(key).ContentType(contentType).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `StorageAPI.StorageUpload``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `StorageUpload`: StorageUpload200Response
fmt.Fprintf(os.Stdout, "Response from `StorageAPI.StorageUpload`: %v\n", resp)
}Other parameters are passed through a pointer to a apiStorageUploadRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| file | *os.File | ||
| key | string | Storage key/path | |
| contentType | string |
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]