// custom.scss
$blue: #2C3E50;
$indigo: #6610f2;
$purple: #6f42c1;
$pink: #e83e8c;
$red: #E74C3C;
$orange: #fd7e14;
$yellow: #F39C12;
$green: #18BC9C;
$teal: #20c997;
$cyan: #3498DB;
$white: #fff;
$gray: #95a5a6;
$gray-dark: #343a40;
$primary: #2C3E50;
$secondary: #95a5a6;
$success: #18BC9C;
$info: #3498DB;
$warning: #F39C12;
$danger: #E74C3C;
$light: #ecf0f1;
$dark: #7b8a8b;
$breakpoint-xs: 0;
$breakpoint-sm: 576px;
$breakpoint-md: 768px;
$breakpoint-lg: 992px;
$breakpoint-xl: 1200px;
$font-family-sans-serif: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
$navbar-height: 56px + 18px;
$footer-heigth: 80px;
@import '_html.scss';
@import '_header.scss';
@import '_person.scss';
@import '_about.scss';
@import '_feedback.scss';
@import '_footer.scss';
@import '_sharer.scss';
@import '_signin.scss';
@import 'node_modules/bootstrap/scss/bootstrap';
@import 'node_modules/bootstrap-vue/src/index.scss';
[
{ "id":"7777", "date":"12.07.2019 14:32:55", "barcodes": ["123456789123","123456789124"]}
]
var now = DateTime.Now;
var image = new DbFile
{
Created = now,
CreatedBy = customer.Id,
Path = uploadedFile.FileName
};
var file = await _ctx.Files.Create(image);
var fullPath = _upHelper.GetFullPathForFile(file.Id, image.Path);
var path = new FileInfo(fullPath).DirectoryName;
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
using (var fileStream = new FileStream(fullPath, FileMode.Create))
{
await uploadedFile.CopyToAsync(fileStream);
var md = new FileInfoModel()
{
Id = file.Id,
Created = file.Created,
CreatedBy = file.CreatedBy,
Name = file.Path,
Url = _upHelper.GetUriPath(file.Id, file.Path)
};
gattachments.Add(md);
}
private string GetPathFromId(long id, string fileName)
{
var ext = new FileInfo(fileName).Extension;
var fname = id.ToString().Reverse().ToArray();
if (fname.Length == 1)
return $"{fname[0]}/{id}{ext}";
if (fname.Length > 1)
return $"{fname[0]}/{fname[1]}/{id}{ext}";
throw new ArgumentOutOfRangeException("No file with id: " + id);
}