temp commit
This commit is contained in:
parent
f5ac34e639
commit
2724b6b9d2
14 changed files with 136 additions and 19 deletions
|
@ -100,7 +100,7 @@
|
|||
{
|
||||
Stream stream = selectedFile.OpenReadStream(maxAllowedSize: 512000 * 4); // max 2MB
|
||||
var file = Path.GetRandomFileName() + "." + selectedFile.Name.Split(".")[selectedFile.Name.Split(".").Length - 1];
|
||||
var path = $"{env.WebRootPath}\\img\\dynamic\\comment\\{@post.Board}\\{file}";
|
||||
var path = $"{env.WebRootPath}/img/dynamic/comment/{@post.Board}/{file}";
|
||||
FileStream fs = File.Create(path);
|
||||
await stream.CopyToAsync(fs);
|
||||
stream.Close();
|
||||
|
@ -110,7 +110,7 @@
|
|||
var imageToUpload = new ImageData
|
||||
{
|
||||
Board = post.Board,
|
||||
ImageLocation = $"\\img\\dynamic\\comment\\{post.Board}\\{file}"
|
||||
ImageLocation = $"/img/dynamic/comment/{post.Board}/{file}"
|
||||
};
|
||||
int imageID = await ImagesRepository.createImageAsync(imageToUpload);
|
||||
commentToCreate = new CommentData()
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
|
||||
Stream stream = selectedFile.OpenReadStream(maxAllowedSize: 512000 * 4); // max 2MB
|
||||
var file = Path.GetRandomFileName() + "." + selectedFile.Name.Split(".")[selectedFile.Name.Split(".").Length - 1];
|
||||
var path = $"{env.WebRootPath}\\img\\dynamic\\op\\{board.Tag}\\{file}";
|
||||
var path = $"{env.WebRootPath}/img/dynamic/op/{board.Tag}/{file}";
|
||||
FileStream fs = File.Create(path);
|
||||
await stream.CopyToAsync(fs);
|
||||
stream.Close();
|
||||
|
@ -129,7 +129,7 @@
|
|||
var imageToUpload = new ImageData
|
||||
{
|
||||
Board = board.Tag,
|
||||
ImageLocation = $"\\img\\dynamic\\op\\{board.Tag}\\{file}"
|
||||
ImageLocation = $"/img/dynamic/op/{board.Tag}/{file}"
|
||||
};
|
||||
int imageID = await ImagesRepository.createImageAsync(imageToUpload);
|
||||
var postToPost = new PostData
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue