| WikiSiteExtensionsUploadAsync(WikiSite, String, WikiUploadSource, String, Boolean, AutoWatchBehavior) Method |
This is preliminary documentation and is subject to change.
Asynchronously uploads a file in this title.
Namespace: WikiClientLibrary.FilesAssembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax public static Task<UploadResult> UploadAsync(
this WikiSite site,
string title,
WikiUploadSource source,
string? comment,
bool ignoreWarnings,
AutoWatchBehavior watch
)
<ExtensionAttribute>
Public Shared Function UploadAsync (
site As WikiSite,
title As String,
source As WikiUploadSource,
comment As String,
ignoreWarnings As Boolean,
watch As AutoWatchBehavior
) As Task(Of UploadResult)
Dim site As WikiSite
Dim title As String
Dim source As WikiUploadSource
Dim comment As String
Dim ignoreWarnings As Boolean
Dim watch As AutoWatchBehavior
Dim returnValue As Task(Of UploadResult)
returnValue = site.UploadAsync(title,
source, comment, ignoreWarnings,
watch)
public:
[ExtensionAttribute]
static Task<UploadResult^>^ UploadAsync(
WikiSite^ site,
String^ title,
WikiUploadSource^ source,
String^ comment,
bool ignoreWarnings,
AutoWatchBehavior watch
)
[<ExtensionAttribute>]
static member UploadAsync :
site : WikiSite *
title : string *
source : WikiUploadSource *
comment : string *
ignoreWarnings : bool *
watch : AutoWatchBehavior -> Task<UploadResult>
Parameters
- site WikiSite
- title String
- source WikiUploadSource
- Source of the file.
- comment String
- Comment of the upload, as well as the page content if it doesn't exist.
- ignoreWarnings Boolean
- Ignore any warnings. This must be set to upload a new version of an existing image.
- watch AutoWatchBehavior
- Whether to add the file into your watchlist.
Return Value
TaskUploadResultAn
UploadResult. You need to check
ResultCode for further action.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
WikiSite. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Exceptions See Also