C# Class Badges.Services.FileService

Inheritance: IFileService
Mostra file Open project: ucdavis/Badges

Public Methods

Method Description
Delete ( System.Guid id, bool publicAccess = false ) : void
FileService ( ) : System
Get ( System.Guid id, bool publicAccess = false ) : BlobResult
Save ( System.Web.HttpPostedFileBase file, bool publicAccess = false ) : BlobIdentity

Save a file and return the URL for that file

Save ( Stream originalStream, Stream modifiedStream, string contentType, bool publicAccess = false ) : BlobIdentity

Save two versions of the same file, but return the modified version for consumption

Save ( Stream stream, string contentType, bool publicAccess = false ) : BlobIdentity

Save a file and return the URL for that file

Update ( System.Guid imageId, System.Web.HttpPostedFileBase file, bool publicAccess = false ) : BlobIdentity

We'd like to have a new ID generated after updating, so just delete and save

Private Methods

Method Description
SetContentType ( ICloudBlob blob, string contentType ) : void

Method Details

Delete() public method

public Delete ( System.Guid id, bool publicAccess = false ) : void
id System.Guid
publicAccess bool
return void

FileService() public method

public FileService ( ) : System
return System

Get() public method

public Get ( System.Guid id, bool publicAccess = false ) : BlobResult
id System.Guid
publicAccess bool
return Badges.Models.Services.BlobResult

Save() public method

Save a file and return the URL for that file
public Save ( System.Web.HttpPostedFileBase file, bool publicAccess = false ) : BlobIdentity
file System.Web.HttpPostedFileBase
publicAccess bool
return Badges.Models.Services.BlobIdentity

Save() public method

Save two versions of the same file, but return the modified version for consumption
public Save ( Stream originalStream, Stream modifiedStream, string contentType, bool publicAccess = false ) : BlobIdentity
originalStream Stream
modifiedStream Stream
contentType string
publicAccess bool
return Badges.Models.Services.BlobIdentity

Save() public method

Save a file and return the URL for that file
public Save ( Stream stream, string contentType, bool publicAccess = false ) : BlobIdentity
stream Stream
contentType string
publicAccess bool
return Badges.Models.Services.BlobIdentity

Update() public method

We'd like to have a new ID generated after updating, so just delete and save
public Update ( System.Guid imageId, System.Web.HttpPostedFileBase file, bool publicAccess = false ) : BlobIdentity
imageId System.Guid
file System.Web.HttpPostedFileBase
publicAccess bool
return Badges.Models.Services.BlobIdentity