Class UploaderProvider
Legacy provider wrapper built on top of the v5 storage and upload services.
Inheritance
UploaderProvider
Assembly: AjaxUploader.dll
Syntax
public class UploaderProvider : IDisposable
Properties
Context
Declaration
protected HttpContext Context { get; }
Property Value
IsDisposed
Gets whether this provider wrapper has been disposed.
Declaration
public virtual bool IsDisposed { get; }
Property Value
SupportFS
Gets whether the underlying provider exposes file-system paths.
Declaration
public virtual bool SupportFS { get; }
Property Value
Uploader
Declaration
protected IAjaxUploader Uploader { get; }
Property Value
Methods
AppendData(Guid, string, Stream)
Appends data to an uploaded file.
Declaration
public virtual void AppendData(Guid guid, string filename, Stream stream)
Parameters
CopyTo(Guid, string)
Copies the uploaded file to a new file-system path.
Declaration
public virtual void CopyTo(Guid guid, string newpath)
Parameters
Delete(Guid)
Deletes the specified uploaded file.
Declaration
public virtual void Delete(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Dispose()
Disposes this compatibility wrapper.
Declaration
public virtual void Dispose()
Exists(Guid)
Returns whether the specified uploaded file exists.
Declaration
public virtual bool Exists(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
GetFSPath(Guid)
Gets the file-system path for the uploaded file when supported.
Declaration
public virtual string GetFSPath(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
GetInfo(Guid, out string, out int, out bool)
Gets file metadata for the specified uploaded file.
Declaration
public virtual bool GetInfo(Guid guid, out string fileName, out int fileSize, out bool persist)
Parameters
Returns
GetName(Guid)
Gets the original file name for the specified upload.
Declaration
public virtual string GetName(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
GetSize(Guid)
Gets the file size in bytes for the specified upload.
Declaration
public virtual int GetSize(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
Init(IAjaxUploader, HttpContext)
Initializes the provider for the current uploader instance and request context.
Declaration
public virtual void Init(IAjaxUploader uploader, HttpContext context)
Parameters
Maintain()
Runs provider-specific maintenance tasks.
Declaration
public virtual void Maintain()
MoveTo(Guid, string)
Moves the uploaded file to a new file-system path.
Declaration
public virtual void MoveTo(Guid guid, string newpath)
Parameters
OpenStream(Guid)
Opens a readable stream for the specified uploaded file.
Declaration
public virtual Stream OpenStream(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Returns
Persist(Guid)
Marks the uploaded file as persisted.
Declaration
public virtual void Persist(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Save(Guid, string, Stream)
Saves the uploaded file contents from a stream.
Declaration
public virtual void Save(Guid guid, string filename, Stream stream)
Parameters
Save(Guid, string, string)
Saves the uploaded file contents from a temporary file path.
Declaration
public virtual void Save(Guid guid, string filename, string temppath)
Parameters
SaveInfo(UploadedFileInfo)
Declaration
protected void SaveInfo(UploadedFileInfo info)
Parameters
TrimToLength(Guid, long)
Truncates the uploaded file to the specified length.
Declaration
public virtual void TrimToLength(Guid guid, long length)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
| long |
length |
|
UnPersist(Guid)
Removes the persisted flag from the uploaded file.
Declaration
public virtual void UnPersist(Guid guid)
Parameters
| Type |
Name |
Description |
| Guid |
guid |
|
Implements