Skip to main content

FilesUploadFeature

Assembly: ServiceStack.dll​
View Source​
Declaration
public class FilesUploadFeature : IPlugin, IHasStringId, IHasId<string>, IPreInitPlugin

Properties​

Id​

View Source​
Declaration
public string Id { get; }

Locations​

View Source​
Declaration
public UploadLocation[] Locations { get; set; }

BasePath​

View Source​
Declaration
public string BasePath { get; set; }

Errors​

View Source​
Declaration
public FilesUploadErrorMessages Errors { get; set; }

Methods​

GetLocation(String)​

View Source​
Declaration
public UploadLocation GetLocation(string name)
Returns​

ServiceStack.UploadLocation

Parameters​
TypeName
System.Stringname

GetLocationFromProperty(Type, String)​

View Source​
Declaration
public UploadLocation GetLocationFromProperty(Type requestType, string propName)
Returns​

ServiceStack.UploadLocation

Parameters​
TypeName
System.TyperequestType
System.StringpropName

BeforePluginsLoaded(IAppHost)​

View Source​
Declaration
public void BeforePluginsLoaded(IAppHost appHost)
Parameters​
TypeName
ServiceStack.IAppHostappHost

Register(IAppHost)​

View Source​
Declaration
public void Register(IAppHost appHost)
Parameters​
TypeName
ServiceStack.IAppHostappHost

AssertLocation(String, IRequest)​

View Source​
Declaration
public UploadLocation AssertLocation(string name, IRequest req = null)
Returns​

ServiceStack.UploadLocation

Parameters​
TypeName
System.Stringname
ServiceStack.Web.IRequestreq

UploadFileAsync(UploadLocation, IRequest, IAuthSession, IHttpFile, CancellationToken)​

View Source​
Declaration
public async Task<string> UploadFileAsync(UploadLocation location, IRequest req, IAuthSession session, IHttpFile file, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task<System.String>

Parameters​
TypeName
ServiceStack.UploadLocationlocation
ServiceStack.Web.IRequestreq
ServiceStack.Auth.IAuthSessionsession
ServiceStack.Web.IHttpFilefile
System.Threading.CancellationTokentoken

ResolveUploadFilePath(FilesUploadContext)​

View Source​
Declaration
public ResolvedPath ResolveUploadFilePath(FilesUploadContext ctx)
Returns​

ServiceStack.ResolvedPath

Parameters​
TypeName
ServiceStack.FilesUploadContextctx

ValidateFileUpload(UploadLocation, IRequest, IHttpFile, String)​

View Source​
Declaration
public void ValidateFileUpload(UploadLocation location, IRequest req, IHttpFile file, string vfsPath)
Parameters​
TypeName
ServiceStack.UploadLocationlocation
ServiceStack.Web.IRequestreq
ServiceStack.Web.IHttpFilefile
System.StringvfsPath

GetFileAsync(UploadLocation, IRequest, IAuthSession, String)​

View Source​
Declaration
public async Task<IVirtualFile> GetFileAsync(UploadLocation location, IRequest req, IAuthSession session, string vfsPath)
Returns​

System.Threading.Tasks.Task<ServiceStack.IO.IVirtualFile>

Parameters​
TypeName
ServiceStack.UploadLocationlocation
ServiceStack.Web.IRequestreq
ServiceStack.Auth.IAuthSessionsession
System.StringvfsPath

ReplaceFileAsync(UploadLocation, IRequest, IAuthSession, String, CancellationToken)​

View Source​
Declaration
public async Task ReplaceFileAsync(UploadLocation location, IRequest req, IAuthSession session, string vfsPath, CancellationToken token = default(CancellationToken))
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
ServiceStack.UploadLocationlocation
ServiceStack.Web.IRequestreq
ServiceStack.Auth.IAuthSessionsession
System.StringvfsPath
System.Threading.CancellationTokentoken

DeleteFileAsync(UploadLocation, IRequest, IAuthSession, String)​

View Source​
Declaration
public async Task<bool> DeleteFileAsync(UploadLocation location, IRequest req, IAuthSession session, string vfsPath)
Returns​

System.Threading.Tasks.Task<System.Boolean>

Parameters​
TypeName
ServiceStack.UploadLocationlocation
ServiceStack.Web.IRequestreq
ServiceStack.Auth.IAuthSessionsession
System.StringvfsPath

Implements​