AsposeThreeDCloud-ThreeDCloudApi
view release on metacpan or search on metacpan
docs/FilesUploadResult.md view on Meta::CPAN
# AsposeThreeDCloud::Object::FilesUploadResult
## Load the model package
```perl
use AsposeThreeDCloud::Object::FilesUploadResult;
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uploaded** | **ARRAY[string]** | List of uploaded file names | [optional]
**errors** | [**ARRAY[Error]**](Error.md) | List of errors. | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
docs/ThreeDCloudApi.md view on Meta::CPAN
[**post_convert_by_opt**](ThreeDCloudApi.md#post_convert_by_opt) | **POST** /3d/saveas/saveoption | Convert file on server to other formats with saveOption parameter
[**post_create**](ThreeDCloudApi.md#post_create) | **POST** /3d/new | Create new file with specified format.
[**post_model**](ThreeDCloudApi.md#post_model) | **POST** /3d/root | Parametric Modeling, Create a Entity with size and located in ...
[**post_pdf_raw_data**](ThreeDCloudApi.md#post_pdf_raw_data) | **POST** /3d/extract/rawdata | Extract raw data(without any modification) from a password protected PDF file
[**post_save_as_part**](ThreeDCloudApi.md#post_save_as_part) | **POST** /3d/saveas/part | Convert part of the file into different format
[**post_scene_to_file**](ThreeDCloudApi.md#post_scene_to_file) | **POST** /3d/extract/scene | Extract and save in different format
[**post_triangulate_new**](ThreeDCloudApi.md#post_triangulate_new) | **POST** /3d/triangulate/new | Triangulate whole file and save to the different file
[**post_triangulate_original**](ThreeDCloudApi.md#post_triangulate_original) | **POST** /3d/triangulate/original | Triangulate whole file and save to original file
[**post_triangulate_part**](ThreeDCloudApi.md#post_triangulate_part) | **POST** /3d/triangulate/part | Triangulate part of the scene(Specified by OAP) and save the scene to different file
[**storage_exists**](ThreeDCloudApi.md#storage_exists) | **GET** /3d/storage/{storageName}/exist | Check if storage exists
[**upload_file**](ThreeDCloudApi.md#upload_file) | **PUT** /3d/storage/file/{path} | Upload file
# **copy_file**
> copy_file(src_path => $src_path, dest_path => $dest_path, src_storage_name => $src_storage_name, dest_storage_name => $dest_storage_name, version_id => $version_id)
Copy file
### Example
```perl
use Data::Dumper;
docs/ThreeDCloudApi.md view on Meta::CPAN
[JWT](../README.md#JWT)
### 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_file**
> FilesUploadResult upload_file(path => $path, file => $file, storage_name => $storage_name)
Upload file
### Example
```perl
use Data::Dumper;
use AsposeThreeDCloud::ThreeDCloudApi;
my $api_instance = AsposeThreeDCloud::ThreeDCloudApi->new(
# Configure OAuth2 access token for authorization: JWT
access_token => 'YOUR_ACCESS_TOKEN',
);
my $path = 'path_example'; # string | Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename param...
my $file = '/path/to/file.txt'; # File | File to upload
my $storage_name = 'storage_name_example'; # string | Storage name
eval {
my $result = $api_instance->upload_file(path => $path, file => $file, storage_name => $storage_name);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ThreeDCloudApi->upload_file: $@\n";
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**path** | **string**| Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter ...
**file** | **File**| File to upload |
**storage_name** | **string**| Storage name | [optional]
### Return type
[**FilesUploadResult**](FilesUploadResult.md)
### Authorization
[JWT](../README.md#JWT)
lib/AsposeThreeDCloud/Object/FilesUploadResult.pm view on Meta::CPAN
use Log::Any qw($log);
use Date::Parse;
use DateTime;
use AsposeThreeDCloud::Object::Error;
use base ("Class::Accessor", "Class::Data::Inheritable");
#
#File upload result
#
# NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
# REF: https://github.com/swagger-api/swagger-codegen
#
=begin comment
Aspose.3D Cloud API Reference
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
lib/AsposeThreeDCloud/Object/FilesUploadResult.pm view on Meta::CPAN
} elsif ( grep( /^$type$/, ('int', 'double', 'string', 'boolean'))) {
return $data;
} else { # hash(model)
my $_instance = eval "AsposeThreeDCloud::Object::$type->new()";
return $_instance->from_hash($data);
}
}
__PACKAGE__->class_documentation({description => 'File upload result',
class => 'FilesUploadResult',
required => [], # TODO
} );
__PACKAGE__->method_documentation({
'uploaded' => {
datatype => 'ARRAY[string]',
base_name => 'Uploaded',
description => 'List of uploaded file names',
format => '',
read_only => '',
},
'errors' => {
datatype => 'ARRAY[Error]',
base_name => 'Errors',
description => 'List of errors.',
format => '',
read_only => '',
},
});
__PACKAGE__->swagger_types( {
'uploaded' => 'ARRAY[string]',
'errors' => 'ARRAY[Error]'
} );
__PACKAGE__->attribute_map( {
'uploaded' => 'Uploaded',
'errors' => 'Errors'
} );
__PACKAGE__->mk_accessors(keys %{__PACKAGE__->attribute_map});
1;
lib/AsposeThreeDCloud/ThreeDCloudApi.pm view on Meta::CPAN
$query_params, $form_params,
$header_params, $_body_data, $auth_settings);
if (!$response) {
return;
}
my $_response_object = $self->{api_client}->deserialize('StorageExist', $response);
return $_response_object;
}
#
# upload_file
#
# Upload file
#
# @param string $path Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter ...
# @param File $file File to upload (required)
# @param string $storage_name Storage name (optional)
{
my $params = {
'path' => {
data_type => 'string',
description => 'Path where to upload including filename and extension e.g. /file.ext or /Folder 1/file.ext If the content is multipart and path does not contains the file name it tries to get them from filename parameter ...
required => '1',
},
'file' => {
data_type => 'File',
description => 'File to upload',
required => '1',
},
'storage_name' => {
data_type => 'string',
description => 'Storage name',
required => '0',
},
};
__PACKAGE__->method_documentation->{ 'upload_file' } = {
summary => 'Upload file',
params => $params,
returns => 'FilesUploadResult',
};
}
# @return FilesUploadResult
#
sub upload_file {
my ($self, %args) = @_;
# verify the required parameter 'path' is set
unless (exists $args{'path'}) {
croak("Missing the required parameter 'path' when calling upload_file");
}
# verify the required parameter 'file' is set
unless (exists $args{'file'}) {
croak("Missing the required parameter 'file' when calling upload_file");
}
# parse inputs
my $_resource_path = '/3d/storage/file/{path}';
my $_method = 'PUT';
my $query_params = {};
my $header_params = {};
my $form_params = {};
( run in 0.851 second using v1.01-cache-2.11-cpan-b16cb0d3907 )