-
Notifications
You must be signed in to change notification settings - Fork 366
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
socioboard 3.0 update
- Loading branch information
Showing
42 changed files
with
1,831 additions
and
480 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using Microsoft.AspNetCore.Hosting; | ||
using Microsoft.AspNetCore.Http; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Api.Socioboard.Helper | ||
{ | ||
public class MediaHelper | ||
{ | ||
public static string UploadMedia(IFormFile files, Helper.AppSettings _appSettings, IHostingEnvironment _appEnv) | ||
{ | ||
var filename = string.Empty; | ||
var uploads = string.Empty; | ||
var fileName = Microsoft.Net.Http.Headers.ContentDispositionHeaderValue.Parse(files.ContentDisposition).FileName.Trim('"'); | ||
filename = Microsoft.Net.Http.Headers.ContentDispositionHeaderValue | ||
.Parse(files.ContentDisposition) | ||
.FileName | ||
.Trim('"'); | ||
var tempName = Domain.Socioboard.Helpers.SBHelper.RandomString(10) + '.' + fileName.Split('.')[1]; | ||
|
||
filename = _appEnv.WebRootPath + "\\upload" + $@"\{tempName}"; | ||
uploads = _appSettings.ApiDomain + "/api/Media/get?id=" + $@"{tempName}"; | ||
try | ||
{ | ||
using (FileStream fs = System.IO.File.Create(filename)) | ||
{ | ||
files.CopyTo(fs); | ||
fs.Flush(); | ||
} | ||
filename = uploads; | ||
return filename; | ||
} | ||
catch (System.Exception ex) | ||
{ | ||
return null; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ public enum ScheduleStatus | |
{ | ||
Compleated=1, | ||
Pending=0, | ||
Deleted=2 | ||
Deleted=2, | ||
error = 3 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Domain.Socioboard.Enum | ||
{ | ||
public enum ScheduledStatus | ||
{ | ||
Default = 0, | ||
Scheduled = 1, | ||
Published = 2, | ||
Deleted = 3 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using Domain.Socioboard.Enum; | ||
using Domain.Socioboard.Helpers; | ||
using MongoDB.Bson; | ||
using MongoDB.Bson.Serialization.Attributes; | ||
using Newtonsoft.Json; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
|
||
namespace Domain.Socioboard.Models.Mongo | ||
{ | ||
[BsonIgnoreExtraElements] | ||
public class SavedFeedsComments | ||
{ | ||
[BsonId] | ||
[JsonConverter(typeof(ObjectIdConverter))] | ||
public ObjectId commentId { get; set; } | ||
public string postId { get; set; } | ||
public string profileId { get; set; } | ||
public string commentText { get; set; } | ||
public double savedTime { get; set; } | ||
public long userId { get; set; } | ||
public long groupId { get; set; } | ||
public string userProfilePic { get; set; } | ||
public string userName { get; set; } | ||
public bool updateCommentStatus { get; set; } | ||
|
||
} | ||
} |
Oops, something went wrong.