Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
send-file-api
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alan Farhadi
send-file-api
Commits
d808cb17
Commit
d808cb17
authored
May 17, 2020
by
Mahmoud Bakhtvar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
using is ommited
parent
4381fa38
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
SCUController.cs
Controllers/SCUController.cs
+2
-3
No files found.
Controllers/SCUController.cs
View file @
d808cb17
...
...
@@ -30,12 +30,11 @@ namespace SendFileWebapi.Controllers
inputsDto
.
FileNames
.
ToObservable
()
.
Select
(
fileName
=>
Observable
.
FromAsync
(
async
()
=>
{
using
(
var
stream
=
fileName
.
OpenReadStream
())
{
var
stream
=
fileName
.
OpenReadStream
();
var
request
=
new
Dicom
.
Network
.
DicomCStoreRequest
(
await
DicomFile
.
OpenAsync
(
stream
));
await
client
.
AddRequestAsync
(
request
);
await
client
.
SendAsync
();
}
stream
.
Dispose
();
}).
Select
(
x
=>
fileName
.
FileName
).
Catch
<
string
,
Exception
>(
exp
=>
throw
new
Exception
(
$"failed to send:
{
fileName
}
, with error:
{
exp
.
Message
}
"
)))
.
Concat
()
.
Subscribe
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment