Files
tgstation-server/_transfer_controller_8cs_source.html

202 lines
34 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tgstation-server: src/Tgstation.Server.Host/Controllers/TransferController.cs Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">tgstation-server<span id="projectnumber">&#160;6.19.3</span>
</div>
<div id="projectbrief">The /tg/station 13 server suite</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_34761767c1c3cd212f9d2f80ea0828a8.html">Tgstation.Server.Host</a></li><li class="navelem"><a class="el" href="dir_38cec1532eaed7aa1de0b599a76e3e80.html">Controllers</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">TransferController.cs</div></div>
</div><!--header-->
<div class="contents">
<a href="_transfer_controller_8cs.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="keyword">using </span>System;</div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="keyword">using </span>System.ComponentModel.DataAnnotations;</div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="keyword">using </span>System.Threading;</div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">using </span>System.Threading.Tasks;</div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="keyword">using </span>Microsoft.AspNetCore.Mvc;</div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="keyword">using </span>Microsoft.Extensions.Logging;</div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_api.html">Tgstation.Server.Api</a>;</div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html">Tgstation.Server.Api.Models</a>;</div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_api_1_1_models_1_1_response.html">Tgstation.Server.Api.Models.Response</a>;</div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_results.html">Tgstation.Server.Host.Controllers.Results</a>;</div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_database.html">Tgstation.Server.Host.Database</a>;</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_extensions.html">Tgstation.Server.Host.Extensions</a>;</div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_security.html">Tgstation.Server.Host.Security</a>;</div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_transfer.html">Tgstation.Server.Host.Transfer</a>;</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="keyword">using </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_utils.html">Tgstation.Server.Host.Utils</a>;</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> </div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespace_tgstation_1_1_server_1_1_host_1_1_controllers.html">Tgstation.Server.Host.Controllers</a></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span>{</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> [Route(<a class="code hl_class" href="class_tgstation_1_1_server_1_1_api_1_1_routes.html">Routes</a>.<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_api_1_1_routes.html#aad30766a124861c66c46815784bdf9d0">Transfer</a>)]</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> [RequestSizeLimit(<a class="code hl_class" href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_limits.html">Limits</a>.<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_limits.html#afbeb6312820403bf96abefefac01b58b">MaximumFileTransferSize</a>)]</div>
<div class="foldopen" id="foldopen00026" data-start="{" data-end="};">
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html"> 26</a></span> <span class="keyword">public</span> <span class="keyword">sealed</span> <span class="keyword">class </span><a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html">TransferController</a> : <a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_api_controller.html">ApiController</a></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> {</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a37572bb0d01675ecf1d99a57bce824e0"> 31</a></span> readonly <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_transfer_1_1_i_file_transfer_stream_handler.html">IFileTransferStreamHandler</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a37572bb0d01675ecf1d99a57bce824e0">fileTransferService</a>;</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="foldopen" id="foldopen00041" data-start="{" data-end="}">
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a21a3515aa21e9b6e5f39eb7041cc5002"> 41</a></span> <span class="keyword">public</span> <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a21a3515aa21e9b6e5f39eb7041cc5002">TransferController</a>(</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context.html">IDatabaseContext</a> databaseContext,</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_security_1_1_i_authentication_context.html">IAuthenticationContext</a> authenticationContext,</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_transfer_1_1_i_file_transfer_stream_handler.html">IFileTransferStreamHandler</a> <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a37572bb0d01675ecf1d99a57bce824e0">fileTransferService</a>,</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> ILogger&lt;ApiController&gt; logger,</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span> <a class="code hl_interface" href="interface_tgstation_1_1_server_1_1_host_1_1_utils_1_1_i_api_headers_provider.html">IApiHeadersProvider</a> apiHeaders)</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> : base(</div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> databaseContext,</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span> authenticationContext,</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span> apiHeaders,</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span> logger,</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> true)</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> {</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> this.fileTransferService = <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a37572bb0d01675ecf1d99a57bce824e0">fileTransferService</a> ?? <span class="keywordflow">throw</span> <span class="keyword">new</span> ArgumentNullException(nameof(<a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a37572bb0d01675ecf1d99a57bce824e0">fileTransferService</a>));</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span> }</div>
</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span> </div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> [TgsAuthorize]</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> [HttpGet]</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> [ProducesResponseType(200, Type = typeof(<a class="code hl_class" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_results_1_1_limited_stream_result.html">LimitedStreamResult</a>))]</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> [ProducesResponseType(410, Type = typeof(<a class="code hl_class" href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_1_1_error_message_response.html">ErrorMessageResponse</a>))]</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a199627b7cb0d306297b5bdbf3db04f9f"> 69</a></span> <span class="keyword">public</span> ValueTask&lt;IActionResult&gt; <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a199627b7cb0d306297b5bdbf3db04f9f">Download</a>([<a class="code hl_enumvalue" href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html#ae758c5cd6d61f61a7dc4b6f3c7000b52ab651efdb98a5d6bd2b3935d0c3f4a5e2">Required</a>, FromQuery] <span class="keywordtype">string</span> ticket, CancellationToken cancellationToken)</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> =&gt; <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a37572bb0d01675ecf1d99a57bce824e0">fileTransferService</a>.GenerateDownloadResponse(<span class="keyword">this</span>, ticket, cancellationToken);</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> [TgsAuthorize]</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> [HttpPut]</div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span> [DisableRequestSizeLimit]</div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> [ProducesResponseType(204)]</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> [ProducesResponseType(410, Type = typeof(<a class="code hl_class" href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_1_1_error_message_response.html">ErrorMessageResponse</a>))]</div>
<div class="foldopen" id="foldopen00086" data-start="{" data-end="}">
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"><a class="line" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a6ad5ecb6e2fd792b0b3e88675e86e8cb"> 86</a></span> <span class="keyword">public</span> async ValueTask&lt;IActionResult&gt; <a class="code hl_function" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a6ad5ecb6e2fd792b0b3e88675e86e8cb">Upload</a>([<a class="code hl_enumvalue" href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html#ae758c5cd6d61f61a7dc4b6f3c7000b52ab651efdb98a5d6bd2b3935d0c3f4a5e2">Required</a>, FromQuery] <span class="keywordtype">string</span> ticket, CancellationToken cancellationToken)</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> {</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="keywordflow">if</span> (ticket == <span class="keyword">null</span>)</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> <span class="keywordflow">return</span> BadRequest(<span class="keyword">new</span> <a class="code hl_class" href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_1_1_error_message_response.html">ErrorMessageResponse</a>(<a class="code hl_enumeration" href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html#a1a6adb59dd51244efabf4e548e7075c8">ErrorCode</a>.ModelValidationFailure));</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> var fileTicketResult = <span class="keyword">new</span> <a class="code hl_class" href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_1_1_file_ticket_response.html">FileTicketResponse</a></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> {</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> FileTicket = ticket,</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> };</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> var result = await <a class="code hl_variable" href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a37572bb0d01675ecf1d99a57bce824e0">fileTransferService</a>.<a class="code hl_function" href="interface_tgstation_1_1_server_1_1_host_1_1_transfer_1_1_i_file_transfer_stream_handler.html#a6d1e5ab9d088861f7a85f61a0a1f1754">SetUploadStream</a>(fileTicketResult, Request.Body, cancellationToken);</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="keywordflow">if</span> (result != <span class="keyword">null</span>)</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> <span class="keywordflow">return</span> result.ErrorCode == ErrorCode.ResourceNotPresent</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span> ? this.Gone()</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span> : Conflict(result);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span> </div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> <span class="keywordflow">return</span> NoContent();</div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> }</div>
</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span> }</div>
</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span>}</div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_api_1_1_models_1_1_limits_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_limits.html">Tgstation.Server.Api.Models.Limits</a></div><div class="ttdoc">Sanity limits to prevent users from overloading.</div><div class="ttdef"><b>Definition</b> <a href="_limits_8cs_source.html#l00008">Limits.cs:9</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_api_1_1_models_1_1_limits_html_afbeb6312820403bf96abefefac01b58b"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_limits.html#afbeb6312820403bf96abefefac01b58b">Tgstation.Server.Api.Models.Limits.MaximumFileTransferSize</a></div><div class="ttdeci">const int MaximumFileTransferSize</div><div class="ttdoc">The maximum size for file transfers.</div><div class="ttdef"><b>Definition</b> <a href="_limits_8cs_source.html#l00033">Limits.cs:33</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_1_1_error_message_response_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_1_1_error_message_response.html">Tgstation.Server.Api.Models.Response.ErrorMessageResponse</a></div><div class="ttdoc">Represents an error message returned by the server.</div><div class="ttdef"><b>Definition</b> <a href="_error_message_response_8cs_source.html#l00011">ErrorMessageResponse.cs:12</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_1_1_file_ticket_response_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_1_1_file_ticket_response.html">Tgstation.Server.Api.Models.Response.FileTicketResponse</a></div><div class="ttdoc">Response for when file transfers are necessary.</div><div class="ttdef"><b>Definition</b> <a href="_file_ticket_response_8cs_source.html#l00006">FileTicketResponse.cs:7</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_api_1_1_routes_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_api_1_1_routes.html">Tgstation.Server.Api.Routes</a></div><div class="ttdoc">Routes to a server actions.</div><div class="ttdef"><b>Definition</b> <a href="_routes_8cs_source.html#l00008">Routes.cs:9</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_api_1_1_routes_html_aad30766a124861c66c46815784bdf9d0"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_api_1_1_routes.html#aad30766a124861c66c46815784bdf9d0">Tgstation.Server.Api.Routes.Transfer</a></div><div class="ttdeci">const string Transfer</div><div class="ttdoc">The transfer controller.</div><div class="ttdef"><b>Definition</b> <a href="_routes_8cs_source.html#l00108">Routes.cs:108</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_api_controller_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_api_controller.html">Tgstation.Server.Host.Controllers.ApiController</a></div><div class="ttdoc">Base Controller for API functions.</div><div class="ttdef"><b>Definition</b> <a href="_api_controller_8cs_source.html#l00036">ApiController.cs:37</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_results_1_1_limited_stream_result_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_results_1_1_limited_stream_result.html">Tgstation.Server.Host.Controllers.Results.LimitedStreamResult</a></div><div class="ttdoc">Very similar to FileStreamResult except it's IActionResultExecutor&lt;TResult&gt; contains a fix for https:...</div><div class="ttdef"><b>Definition</b> <a href="_limited_stream_result_8cs_source.html#l00018">LimitedStreamResult.cs:19</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller_html"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html">Tgstation.Server.Host.Controllers.TransferController</a></div><div class="ttdoc">ApiController for file streaming.</div><div class="ttdef"><b>Definition</b> <a href="_transfer_controller_8cs_source.html#l00026">TransferController.cs:27</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller_html_a199627b7cb0d306297b5bdbf3db04f9f"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a199627b7cb0d306297b5bdbf3db04f9f">Tgstation.Server.Host.Controllers.TransferController.Download</a></div><div class="ttdeci">ValueTask&lt; IActionResult &gt; Download([Required, FromQuery] string ticket, CancellationToken cancellationToken)</div><div class="ttdoc">Downloads a file with a given ticket .</div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller_html_a21a3515aa21e9b6e5f39eb7041cc5002"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a21a3515aa21e9b6e5f39eb7041cc5002">Tgstation.Server.Host.Controllers.TransferController.TransferController</a></div><div class="ttdeci">TransferController(IDatabaseContext databaseContext, IAuthenticationContext authenticationContext, IFileTransferStreamHandler fileTransferService, ILogger&lt; ApiController &gt; logger, IApiHeadersProvider apiHeaders)</div><div class="ttdoc">Initializes a new instance of the TransferController class.</div><div class="ttdef"><b>Definition</b> <a href="_transfer_controller_8cs_source.html#l00041">TransferController.cs:41</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller_html_a37572bb0d01675ecf1d99a57bce824e0"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a37572bb0d01675ecf1d99a57bce824e0">Tgstation.Server.Host.Controllers.TransferController.fileTransferService</a></div><div class="ttdeci">readonly IFileTransferStreamHandler fileTransferService</div><div class="ttdoc">The IFileTransferStreamHandler for the TransferController.</div><div class="ttdef"><b>Definition</b> <a href="_transfer_controller_8cs_source.html#l00031">TransferController.cs:31</a></div></div>
<div class="ttc" id="aclass_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller_html_a6ad5ecb6e2fd792b0b3e88675e86e8cb"><div class="ttname"><a href="class_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_transfer_controller.html#a6ad5ecb6e2fd792b0b3e88675e86e8cb">Tgstation.Server.Host.Controllers.TransferController.Upload</a></div><div class="ttdeci">async ValueTask&lt; IActionResult &gt; Upload([Required, FromQuery] string ticket, CancellationToken cancellationToken)</div><div class="ttdoc">Uploads a file with a given ticket .</div><div class="ttdef"><b>Definition</b> <a href="_transfer_controller_8cs_source.html#l00086">TransferController.cs:86</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_database_1_1_i_database_context.html">Tgstation.Server.Host.Database.IDatabaseContext</a></div><div class="ttdoc">Represents the database.</div><div class="ttdef"><b>Definition</b> <a href="_i_database_context_8cs_source.html#l00016">IDatabaseContext.cs:17</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_security_1_1_i_authentication_context_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_security_1_1_i_authentication_context.html">Tgstation.Server.Host.Security.IAuthenticationContext</a></div><div class="ttdoc">For creating and accessing authentication contexts.</div><div class="ttdef"><b>Definition</b> <a href="_i_authentication_context_8cs_source.html#l00011">IAuthenticationContext.cs:12</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_transfer_1_1_i_file_transfer_stream_handler_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_transfer_1_1_i_file_transfer_stream_handler.html">Tgstation.Server.Host.Transfer.IFileTransferStreamHandler</a></div><div class="ttdoc">Reads and writes to Streams associated with FileTicketResponses.</div><div class="ttdef"><b>Definition</b> <a href="_i_file_transfer_stream_handler_8cs_source.html#l00013">IFileTransferStreamHandler.cs:14</a></div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_transfer_1_1_i_file_transfer_stream_handler_html_a6d1e5ab9d088861f7a85f61a0a1f1754"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_transfer_1_1_i_file_transfer_stream_handler.html#a6d1e5ab9d088861f7a85f61a0a1f1754">Tgstation.Server.Host.Transfer.IFileTransferStreamHandler.SetUploadStream</a></div><div class="ttdeci">ValueTask&lt; ErrorMessageResponse?&gt; SetUploadStream(FileTicketResponse ticketResponse, Stream stream, CancellationToken cancellationToken)</div><div class="ttdoc">Sets the Stream for a given ticketResponse associated with a pending upload.</div></div>
<div class="ttc" id="ainterface_tgstation_1_1_server_1_1_host_1_1_utils_1_1_i_api_headers_provider_html"><div class="ttname"><a href="interface_tgstation_1_1_server_1_1_host_1_1_utils_1_1_i_api_headers_provider.html">Tgstation.Server.Host.Utils.IApiHeadersProvider</a></div><div class="ttdoc">Provides ApiHeaders.</div><div class="ttdef"><b>Definition</b> <a href="_i_api_headers_provider_8cs_source.html#l00008">IApiHeadersProvider.cs:9</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_api_1_1_models_1_1_response_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_api_1_1_models_1_1_response.html">Tgstation.Server.Api.Models.Response</a></div><div class="ttdef"><b>Definition</b> <a href="_administration_response_8cs_source.html#l00005">AdministrationResponse.cs:6</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_api_1_1_models_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html">Tgstation.Server.Api.Models</a></div><div class="ttdef"><b>Definition</b> <a href="_tgstation_8_server_8_api_2_models_2_chat_channel_8cs_source.html#l00005">ChatChannel.cs:6</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_api_1_1_models_html_a1a6adb59dd51244efabf4e548e7075c8"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html#a1a6adb59dd51244efabf4e548e7075c8">Tgstation.Server.Api.Models.ErrorCode</a></div><div class="ttdeci">ErrorCode</div><div class="ttdoc">Types of Response.ErrorMessageResponses that the API may return.</div><div class="ttdef"><b>Definition</b> <a href="_error_code_8cs_source.html#l00011">ErrorCode.cs:12</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_api_1_1_models_html_ae758c5cd6d61f61a7dc4b6f3c7000b52ab651efdb98a5d6bd2b3935d0c3f4a5e2"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_api_1_1_models.html#ae758c5cd6d61f61a7dc4b6f3c7000b52ab651efdb98a5d6bd2b3935d0c3f4a5e2">Tgstation.Server.Api.Models.DMApiValidationMode.Required</a></div><div class="ttdeci">@ Required</div><div class="ttdoc">DMAPI validation must suceed for the deployment to succeed.</div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_api_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_api.html">Tgstation.Server.Api</a></div><div class="ttdef"><b>Definition</b> <a href="_api_headers_8cs_source.html#l00019">ApiHeaders.cs:20</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_results_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_controllers_1_1_results.html">Tgstation.Server.Host.Controllers.Results</a></div><div class="ttdef"><b>Definition</b> <a href="_limited_stream_result_8cs_source.html#l00013">LimitedStreamResult.cs:14</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_controllers_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_controllers.html">Tgstation.Server.Host.Controllers</a></div><div class="ttdef"><b>Definition</b> <a href="_administration_controller_8cs_source.html#l00026">AdministrationController.cs:27</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_database_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_database.html">Tgstation.Server.Host.Database</a></div><div class="ttdef"><b>Definition</b> <a href="_database_collection_8cs_source.html#l00009">DatabaseCollection.cs:10</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_extensions_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_extensions.html">Tgstation.Server.Host.Extensions</a></div><div class="ttdef"><b>Definition</b> <a href="_application_builder_extensions_8cs_source.html#l00021">ApplicationBuilderExtensions.cs:22</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_security_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_security.html">Tgstation.Server.Host.Security</a></div><div class="ttdef"><b>Definition</b> <a href="_authentication_context_8cs_source.html#l00007">AuthenticationContext.cs:8</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_transfer_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_transfer.html">Tgstation.Server.Host.Transfer</a></div><div class="ttdef"><b>Definition</b> <a href="_file_download_provider_8cs_source.html#l00008">FileDownloadProvider.cs:9</a></div></div>
<div class="ttc" id="anamespace_tgstation_1_1_server_1_1_host_1_1_utils_html"><div class="ttname"><a href="namespace_tgstation_1_1_server_1_1_host_1_1_utils.html">Tgstation.Server.Host.Utils</a></div><div class="ttdef"><b>Definition</b> <a href="_graph_q_l_git_lab_client_8cs_source.html#l00006">GraphQLGitLabClient.cs:7</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>