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.RackspaceAssembly: 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
)
Public Function CreateFormPostUri (
container As String,
objectPrefix As String,
key As String,
expiration As DateTimeOffset,
redirectUri As Uri,
maxFileSize As Long,
maxFileCount As Integer,
Optional region As String = Nothing,
Optional useInternalUrl As Boolean = false,
Optional identity As CloudIdentity = Nothing
) As Tuple(Of Uri, ReadOnlyDictionary(Of String, String))
public:
Tuple<Uri^, ReadOnlyDictionary<String^, String^>^>^ CreateFormPostUri(
String^ container,
String^ objectPrefix,
String^ key,
DateTimeOffset expiration,
Uri^ redirectUri,
long long maxFileSize,
int maxFileCount,
String^ region = nullptr,
bool useInternalUrl = false,
CloudIdentity^ identity = nullptr
)
member CreateFormPostUri :
container : string *
objectPrefix : string *
key : string *
expiration : DateTimeOffset *
redirectUri : Uri *
maxFileSize : int64 *
maxFileCount : int *
?region : string *
?useInternalUrl : bool *
?identity : CloudIdentity
(* Defaults:
let _region = defaultArg region null
let _useInternalUrl = defaultArg useInternalUrl false
let _identity = defaultArg identity null
*)
-> Tuple<Uri, ReadOnlyDictionary<string, string>>
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 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