Click or drag to resize
CloudFilesProviderCreateFormPostUri Method
This API is preliminary and subject to change.
Construct a Uri and field information supporting the public upload of objects to a Cloud Files container via an HTTP form submission.

Namespace: net.openstack.Providers.Rackspace
Assembly: openstacknet (in openstacknet.dll) Version: 1.7.7+Branch.master.Sha.25d803f397c8693c2c13777ef6675f796f520f2c
Syntax
public Tuple<Uri, ReadOnlyDictionary<string, string>> CreateFormPostUri(
	string container,
	string objectPrefix,
	string key,
	DateTimeOffset expiration,
	Uri redirectUri,
	long maxFileSize,
	int maxFileCount,
	string region = null,
	bool useInternalUrl = false,
	CloudIdentity identity = null
)

Parameters

container
Type: SystemString
The container name where uploaded files are placed.
objectPrefix
Type: SystemString
The prefix applied to uploaded objects.
key
Type: SystemString
The account key to use with the Form POST feature, as specified in the account TempUrlKey metadata.
expiration
Type: SystemDateTimeOffset
The expiration time for the generated URI.
redirectUri
Type: SystemUri
The URI to redirect the user to after the upload operation completes.
maxFileSize
Type: SystemInt64
Specifies the maximum size in bytes of a single file.
maxFileCount
Type: SystemInt32
The maximum number of files which can be uploaded in a single request.
region (Optional)
Type: SystemString
The region in which to access the object. If not specified, the user's default region will be used.
useInternalUrl (Optional)
Type: SystemBoolean
to use the endpoint's InternalURL; otherwise to use the endpoint's PublicURL.
identity (Optional)
Type: net.openstack.Core.DomainCloudIdentity
The cloud identity to use for this request. If not specified, the default identity for the current provider instance will be used.

Return Value

Type: TupleUri, ReadOnlyDictionaryString, String
A TupleT1, T2 object containing the information necessary to submit a POST operation uploading one or more files to Cloud Files. The first item in the tuple is the absolute URI where the form data should be submitted, which is valid until the expiration time passes or the account key is changed. The value is a collection of key/value pairs describing the names/values of additional fields to submit with the form.
Exceptions
ExceptionCondition
ArgumentNullException If container is .

-or-

If objectPrefix is .

-or-

If key is .

-or-

If redirectUri is .

ArgumentOutOfRangeException If maxFileSize is less than 0.

-or-

If maxFileCount is less or equal to 0.

ArgumentException If container is empty.

-or-

If objectPrefix is empty.

-or-

If key is empty.

-or-

If maxFileSize is greater than LargeFileBatchThreshold.

ContainerNameExceptionIf container is not a valid container name.
ObjectNameExceptionIf objectPrefix is not a valid object name.
NotSupportedException If the provider does not support the given identity type.

-or-

The specified region is not supported.

InvalidOperationException If identity is and no default identity is available for the provider.

-or-

If region is and no default region is available for the provider.

ResponseExceptionIf the REST API request failed.
Remarks
The HTTP form used for uploading files has the following form, where uri is a placeholder for the URI described in the return value from this method.
<form action="<em>uri</em>" method="POST" enctype="multipart/form-data">
  <input type="file" name="file1"/><br/>
  <input type="submit"/>
</form>

In addition to the above <input> fields, the form should include one hidden input for each of the key/value pairs described in the return value from this method. Each of these fields should have the following form, where key and value are placeholders for one key/value pair.

<input type="hidden" name="<em>key</em>" value="<em>value</em>"/>
Version Information

.NET Framework

Supported in: 4.5

openstack.net

Supported in: 1.6, 1.5, 1.4, 1.3.6
See Also