| All Verbs | /api/media/file |
|---|
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Eros.Saguna.Common.WebAPIModel.ServiceModels
Namespace Global
Namespace Eros.Saguna.Common.WebAPIModel.ServiceModels
Public Partial Class SaveMediaResponse
'''<Summary>
'''Media File Guid
'''</Summary>
<ApiMember(DataType:="Guid", Description:="Media File Guid", Name:="ErosMediaFileId", ParameterType:="query")>
Public Overridable Property ErosMediaFileId As Guid
'''<Summary>
'''Media File Name
'''</Summary>
<ApiMember(DataType:="string", Description:="Media File Name", Name:="MediaName", ParameterType:="query")>
Public Overridable Property MediaName As String
'''<Summary>
'''The original name of the media being saved.
'''</Summary>
<ApiMember(DataType:="string", Description:="The original name of the media being saved.", Name:="OriginalFileName", ParameterType:="query")>
Public Overridable Property OriginalFileName As String
'''<Summary>
'''Url of the media file.
'''</Summary>
<ApiMember(DataType:="string", Description:="Url of the media file.", Name:="MediaFileUrl", ParameterType:="query")>
Public Overridable Property MediaFileUrl As String
'''<Summary>
'''Url of the media file thumbnail.
'''</Summary>
<ApiMember(DataType:="string", Description:="Url of the media file thumbnail.", Name:="MediaFileThumbnailUrl", ParameterType:="query")>
Public Overridable Property MediaFileThumbnailUrl As String
'''<Summary>
'''Service Stack Response Status.
'''</Summary>
<ApiMember(DataType:="ResponseStatus", Description:="Service Stack Response Status.", Name:="ResponseStatus", ParameterType:="query")>
Public Overridable Property ResponseStatus As ResponseStatus
End Class
Public Partial Class UploadFile
Public Overridable Property Path As String
Public Overridable Property MediaCaptured As Date
Public Overridable Property ContactId As Guid
Public Overridable Property ApplianceId As Guid
Public Overridable Property ImageWidth As Integer?
Public Overridable Property ImageHeight As Integer?
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /api/media/file HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Path":"String","MediaCaptured":"0001-01-01T00:00:00.0000000","ContactId":"00000000-0000-0000-0000-000000000000","ApplianceId":"00000000-0000-0000-0000-000000000000","ImageWidth":0,"ImageHeight":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ErosMediaFileId":"00000000-0000-0000-0000-000000000000","MediaName":"String","OriginalFileName":"String","MediaFileUrl":"String","MediaFileThumbnailUrl":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}