Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tsi1-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rodrigo Sastre Marotta
tsi1-backend
Commits
c0fb1b27
Commit
c0fb1b27
authored
4 years ago
by
esantangelo
Browse files
Options
Downloads
Patches
Plain Diff
get file names
parent
b80f6a9a
No related branches found
Branches containing commit
No related tags found
2 merge requests
!26
Develop
,
!21
course sections
Pipeline
#10294
passed
4 years ago
Stage: external
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Tsi1.Api/Tsi1.BusinessLayer/Interfaces/IFileService.cs
+1
-0
1 addition, 0 deletions
Tsi1.Api/Tsi1.BusinessLayer/Interfaces/IFileService.cs
Tsi1.Api/Tsi1.BusinessLayer/Services/FileService.cs
+9
-0
9 additions, 0 deletions
Tsi1.Api/Tsi1.BusinessLayer/Services/FileService.cs
with
10 additions
and
0 deletions
Tsi1.Api/Tsi1.BusinessLayer/Interfaces/IFileService.cs
+
1
−
0
View file @
c0fb1b27
...
...
@@ -11,6 +11,7 @@ namespace Tsi1.BusinessLayer.Interfaces
public
interface
IFileService
{
Task
<
ServiceResult
<
string
>>
Create
(
IFormFile
file
,
string
tenantId
,
string
courseId
);
Task
<
List
<
string
>>
GetFileNames
();
ServiceResult
<
bool
>
DeleteFile
(
string
filePath
);
bool
ExistFile
(
string
relativePath
);
}
...
...
This diff is collapsed.
Click to expand it.
Tsi1.Api/Tsi1.BusinessLayer/Services/FileService.cs
+
9
−
0
View file @
c0fb1b27
...
...
@@ -115,5 +115,14 @@ namespace Tsi1.BusinessLayer.Services
return
fileName
+
"."
+
ext
;
}
public
async
Task
<
List
<
string
>>
GetFileNames
()
{
var
fileNames
=
await
_context
.
Files
.
Select
(
x
=>
Path
.
GetFileName
(
x
.
Path
)).
ToListAsync
();
fileNames
.
RemoveAll
(
x
=>
x
.
Length
==
0
);
return
fileNames
;
}
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment