Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • Fix/xxxx-activateGitlab
  • Fix/xxxx-resourceVisibility
  • Hotfix/0071-fixResourceCreate
  • Hotfix/1259-pathParameterFix
  • Hotfix/1261-blockNoMetadata
  • Hotfix/1357-ymlFile
  • Hotfix/1370-swaggerDescription
  • Hotfix/1584-fixResourceLoader
  • Hotfix/1668-versionResourceConfigDepVersion
  • Hotfix/1709-fixDownloadViaRCV2
  • Hotfix/1805-listingBreaks
  • Hotfix/1945-weirdUploadBehavior
  • Hotfix/2087-efNet6
  • Hotfix/2141-fileUploadErrors
  • Hotfix/2254-fixContentLenghtCalculation
  • Hotfix/2371-fixGitLabinRCV
  • Hotfix/2452-linkedDeletion
  • Hotfix/2459-EncodingPath
  • Hotfix/64-releaseUDE
  • Issue/1792-newMetadataStructure
  • Issue/1866-ExtendResourceTypeConfigurationTUDo
  • Issue/1877-ExtendResourceTypeConfigurationNRWFHs
  • Issue/1910-MigrationtoNET6.0
  • Issue/1912-uriMadness
  • Issue/1940ResouceKeysForNRWAndTUDO
  • Issue/1951-quotaImplementation
  • Issue/2061-activateResourceTypeRdss3nrw
  • Issue/2072-wormResourceType
  • Issue/2102-gitLabResTypeRCV
  • Issue/2158-emailServicedesk
  • Issue/2162-fixFolderResponse
  • Issue/2287-guestRole
  • Issue/2309-docs
  • Issue/2349-gitlabHttps
  • Issue/2462-removeTraces
  • Issue/2464-invalidateMeta
  • Product/1100-fdsS3
  • Product/1154-resourceTypeDefinition
  • Product/1188-LoggingExtended
  • Product/1287-dotnet5Sharepoint
  • Product/1301-cleanupblobApi
  • Product/1440-largerFiles
  • Product/1555-readOnlyResources
  • Product/1629-onboardingOtherUniversities
  • Product/903-ApiTokens
  • Product/937-docuBlobApi
  • Sprint/2020-20
  • Sprint/2020-21
  • Sprint/2020-22
  • Sprint/2021-01
  • Sprint/2021-03
  • Sprint/2021-04
  • Sprint/2021-05
  • Sprint/2021-07
  • Sprint/2021-08
  • Sprint/2021-10
  • Sprint/2021-11
  • Sprint/2021-13
  • Sprint/2021-15
  • Sprint/2021-18
  • Sprint/2021-23
  • Sprint/2022-01
  • Topic/1108-docuBlobApi
  • Topic/1123-tokenValidation
  • Topic/1159-rtdApi
  • Topic/1221-LogginExtendedNew
  • Topic/1292-FdsS3
  • Topic/1303-cleanupblobApi
  • Topic/1335-dotnet5Apis
  • Topic/1339-fixGitLabToken
  • Topic/1451-uploadUrl
  • Topic/1452-largerFiles
  • Topic/1575-CheckArchivingStatus
  • Topic/1711-extendResourceTypeConfiguration
  • dev
  • gitkeep
  • master
  • v1.1.0
  • v1.1.1
  • v1.1.2
  • v1.2.0
  • v1.3.0
  • v1.3.1
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.2.0
  • v2.3.0
  • v2.3.1
  • v2.3.2
  • v2.3.3
  • v2.4.0
  • v2.4.1
  • v2.4.2
  • v2.4.3
  • v2.4.4
  • v2.5.0
  • v2.5.1
  • v2.5.2
  • v2.6.0
  • v2.6.1
  • v2.6.2
  • v2.6.3
  • v2.6.4
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.8.0
  • v2.8.1
  • v2.8.2
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.0.3
  • v3.0.4
  • v3.0.5
  • v3.0.6
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.2.3
  • v3.3.0
  • v3.3.1
  • v3.3.2
  • v3.3.3
  • v3.3.4
130 results

Target

Select target project
  • coscine/backend/apis/blobapi
1 result
Select Git revision
  • Fix/xxxx-activateGitlab
  • Fix/xxxx-resourceVisibility
  • Hotfix/0071-fixResourceCreate
  • Hotfix/1259-pathParameterFix
  • Hotfix/1261-blockNoMetadata
  • Hotfix/1357-ymlFile
  • Hotfix/1370-swaggerDescription
  • Hotfix/1584-fixResourceLoader
  • Hotfix/1668-versionResourceConfigDepVersion
  • Hotfix/1709-fixDownloadViaRCV2
  • Hotfix/1805-listingBreaks
  • Hotfix/1945-weirdUploadBehavior
  • Hotfix/2087-efNet6
  • Hotfix/2141-fileUploadErrors
  • Hotfix/2254-fixContentLenghtCalculation
  • Hotfix/2371-fixGitLabinRCV
  • Hotfix/2452-linkedDeletion
  • Hotfix/2459-EncodingPath
  • Hotfix/64-releaseUDE
  • Issue/1792-newMetadataStructure
  • Issue/1866-ExtendResourceTypeConfigurationTUDo
  • Issue/1877-ExtendResourceTypeConfigurationNRWFHs
  • Issue/1910-MigrationtoNET6.0
  • Issue/1912-uriMadness
  • Issue/1940ResouceKeysForNRWAndTUDO
  • Issue/1951-quotaImplementation
  • Issue/2061-activateResourceTypeRdss3nrw
  • Issue/2072-wormResourceType
  • Issue/2102-gitLabResTypeRCV
  • Issue/2158-emailServicedesk
  • Issue/2162-fixFolderResponse
  • Issue/2287-guestRole
  • Issue/2309-docs
  • Issue/2349-gitlabHttps
  • Issue/2462-removeTraces
  • Issue/2464-invalidateMeta
  • Product/1100-fdsS3
  • Product/1154-resourceTypeDefinition
  • Product/1188-LoggingExtended
  • Product/1287-dotnet5Sharepoint
  • Product/1301-cleanupblobApi
  • Product/1440-largerFiles
  • Product/1555-readOnlyResources
  • Product/1629-onboardingOtherUniversities
  • Product/903-ApiTokens
  • Product/937-docuBlobApi
  • Sprint/2020-20
  • Sprint/2020-21
  • Sprint/2020-22
  • Sprint/2021-01
  • Sprint/2021-03
  • Sprint/2021-04
  • Sprint/2021-05
  • Sprint/2021-07
  • Sprint/2021-08
  • Sprint/2021-10
  • Sprint/2021-11
  • Sprint/2021-13
  • Sprint/2021-15
  • Sprint/2021-18
  • Sprint/2021-23
  • Sprint/2022-01
  • Topic/1108-docuBlobApi
  • Topic/1123-tokenValidation
  • Topic/1159-rtdApi
  • Topic/1221-LogginExtendedNew
  • Topic/1292-FdsS3
  • Topic/1303-cleanupblobApi
  • Topic/1335-dotnet5Apis
  • Topic/1339-fixGitLabToken
  • Topic/1451-uploadUrl
  • Topic/1452-largerFiles
  • Topic/1575-CheckArchivingStatus
  • Topic/1711-extendResourceTypeConfiguration
  • dev
  • gitkeep
  • master
  • v1.1.0
  • v1.1.1
  • v1.1.2
  • v1.2.0
  • v1.3.0
  • v1.3.1
  • v2.0.0
  • v2.0.1
  • v2.1.0
  • v2.2.0
  • v2.3.0
  • v2.3.1
  • v2.3.2
  • v2.3.3
  • v2.4.0
  • v2.4.1
  • v2.4.2
  • v2.4.3
  • v2.4.4
  • v2.5.0
  • v2.5.1
  • v2.5.2
  • v2.6.0
  • v2.6.1
  • v2.6.2
  • v2.6.3
  • v2.6.4
  • v2.7.0
  • v2.7.1
  • v2.7.2
  • v2.7.3
  • v2.8.0
  • v2.8.1
  • v2.8.2
  • v3.0.0
  • v3.0.1
  • v3.0.2
  • v3.0.3
  • v3.0.4
  • v3.0.5
  • v3.0.6
  • v3.1.0
  • v3.1.1
  • v3.1.2
  • v3.2.0
  • v3.2.1
  • v3.2.2
  • v3.2.3
  • v3.3.0
  • v3.3.1
  • v3.3.2
  • v3.3.3
  • v3.3.4
130 results
Show changes
Commits on Source (6)
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 16
VisualStudioVersion = 16.0.28803.156 VisualStudioVersion = 16.0.28803.156
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blob", "Blob\Blob.csproj", "{4F76105D-8FC5-403A-A822-9F306A028A76}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blob", "Blob\Blob.csproj", "{4F76105D-8FC5-403A-A822-9F306A028A76}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<AssemblyName>Coscine.Api.Blob</AssemblyName> <AssemblyName>Coscine.Api.Blob</AssemblyName>
<GenerateDocumentationFile>true</GenerateDocumentationFile> <GenerateDocumentationFile>true</GenerateDocumentationFile>
<TargetFramework>net5.0</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<Version>2.5.1</Version> <Version>2.5.2</Version>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Authors>RWTH Aachen University</Authors> <Authors>RWTH Aachen University</Authors>
...@@ -24,5 +24,6 @@ ...@@ -24,5 +24,6 @@
<PackageReference Include="Coscine.ResourceLoader" Version="2.*-*" /> <PackageReference Include="Coscine.ResourceLoader" Version="2.*-*" />
<PackageReference Include="Coscine.ResourceTypeBase" Version="2.*-*" /> <PackageReference Include="Coscine.ResourceTypeBase" Version="2.*-*" />
<PackageReference Include="Coscine.WaterbutlerHelper" Version="2.*-*" /> <PackageReference Include="Coscine.WaterbutlerHelper" Version="2.*-*" />
<PackageReference Include="Microsoft.AspNet.WebApi.Core" Version="5.2.7" />
</ItemGroup> </ItemGroup>
</Project> </Project>
...@@ -144,6 +144,37 @@ namespace Coscine.Api.Blob.Controllers ...@@ -144,6 +144,37 @@ namespace Coscine.Api.Blob.Controllers
/// <returns>File if file exists otherwise status code 204, 400, 401 or 404 </returns> /// <returns>File if file exists otherwise status code 204, 400, 401 or 404 </returns>
[HttpGet("[controller]/{resourceId}/{*path}")] [HttpGet("[controller]/{resourceId}/{*path}")]
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
[ApiExplorerSettings(IgnoreApi = true)]
public async Task<IActionResult> GetFileWithPath(string resourceId, string path)
{
return await GetFile(resourceId, path);
}
/// <summary>
/// This method checks if the given file exists and returns it
/// </summary>
/// <param name="resourceId">Id of the resource</param>
/// <param name="path"> Path to the file </param>
/// <returns>File if file exists otherwise status code 204, 400, 401 or 404 </returns>
[HttpGet("[controller]/{resourceId}/")]
[DisableRequestSizeLimit]
public async Task<IActionResult> GetFileWithParameter(string resourceId, [System.Web.Http.FromUri] string path)
{
// Strip the first slash, to reuse the previous implementation.
if (path.StartsWith("/"))
{
path = path[1..];
}
return await GetFile(resourceId, path);
}
/// <summary>
/// This method checks if the given file exists and returns it
/// </summary>
/// <param name="resourceId">Id of the resource</param>
/// <param name="path"> Path to the file </param>
/// <returns>File if file exists otherwise status code 204, 400, 401 or 404 </returns>
public async Task<IActionResult> GetFile(string resourceId, string path) public async Task<IActionResult> GetFile(string resourceId, string path)
{ {
var user = _authenticator.GetUser(); var user = _authenticator.GetUser();
...@@ -194,6 +225,40 @@ namespace Coscine.Api.Blob.Controllers ...@@ -194,6 +225,40 @@ namespace Coscine.Api.Blob.Controllers
[DisableRequestSizeLimit] [DisableRequestSizeLimit]
[RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)] [RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)]
[HttpPut("[controller]/{resourceId}/{*path}")] [HttpPut("[controller]/{resourceId}/{*path}")]
[ApiExplorerSettings(IgnoreApi = true)]
public async Task<IActionResult> UploadFileWithPath(string resourceId, string path, List<IFormFile> files)
{
return await UploadFile(resourceId, path, files);
}
/// <summary>
/// This method uploads a given File
/// </summary>
/// <param name="resourceId">Id of the resource </param>
/// <param name="path">Path to the file</param>
/// <param name="files">List of files.</param>
/// <returns>status code 204 if file is uploaded otherwise status code 400 or 403</returns>
[DisableRequestSizeLimit]
[RequestFormLimits(MultipartBodyLengthLimit = long.MaxValue)]
[HttpPut("[controller]/{resourceId}/")]
public async Task<IActionResult> UploadFileWithParameter(string resourceId, [System.Web.Http.FromUri] string path, List<IFormFile> files)
{
// Strip the first slash, to reuse the previous implementation.
if (path.StartsWith("/"))
{
path = path[1..];
}
return await UploadFile(resourceId, path, files);
}
/// <summary>
/// This method uploads a given File
/// </summary>
/// <param name="resourceId">Id of the resource </param>
/// <param name="path">Path to the file</param>
/// <param name="files">List of files.</param>
/// <returns>status code 204 if file is uploaded otherwise status code 400 or 403</returns>
public async Task<IActionResult> UploadFile(string resourceId, string path, List<IFormFile> files) public async Task<IActionResult> UploadFile(string resourceId, string path, List<IFormFile> files)
{ {
var user = _authenticator.GetUser(); var user = _authenticator.GetUser();
...@@ -268,6 +333,36 @@ namespace Coscine.Api.Blob.Controllers ...@@ -268,6 +333,36 @@ namespace Coscine.Api.Blob.Controllers
/// <param name="path">Path to the file</param> /// <param name="path">Path to the file</param>
/// <returns>status code 204 if deletion successful otherwise status code 400, 401 or 404 </returns> /// <returns>status code 204 if deletion successful otherwise status code 400, 401 or 404 </returns>
[HttpDelete("[controller]/{resourceId}/{*path}")] [HttpDelete("[controller]/{resourceId}/{*path}")]
[ApiExplorerSettings(IgnoreApi = true)]
public async Task<IActionResult> DeleteFileWithPath(string resourceId, string path)
{
return await DeleteFile(resourceId, path);
}
/// <summary>
/// This method deletes a given file
/// </summary>
/// <param name="resourceId">Id of the resource </param>
/// <param name="path">Path to the file</param>
/// <returns>status code 204 if deletion successful otherwise status code 400, 401 or 404 </returns>
[HttpDelete("[controller]/{resourceId}/")]
public async Task<IActionResult> DeleteFileWithParameter(string resourceId, [System.Web.Http.FromUri] string path)
{
// Strip the first slash, to reuse the previous implementation.
if (path.StartsWith("/"))
{
path = path[1..];
}
return await DeleteFile(resourceId, path);
}
/// <summary>
/// This method deletes a given file
/// </summary>
/// <param name="resourceId">Id of the resource </param>
/// <param name="path">Path to the file</param>
/// <returns>status code 204 if deletion successful otherwise status code 400, 401 or 404 </returns>
public async Task<IActionResult> DeleteFile(string resourceId, string path) public async Task<IActionResult> DeleteFile(string resourceId, string path)
{ {
var user = _authenticator.GetUser(); var user = _authenticator.GetUser();
...@@ -435,7 +530,7 @@ namespace Coscine.Api.Blob.Controllers ...@@ -435,7 +530,7 @@ namespace Coscine.Api.Blob.Controllers
if (CoscineLoggerConfiguration.IsLogLevelActivated(LogType.Analytics)) if (CoscineLoggerConfiguration.IsLogLevelActivated(LogType.Analytics))
{ {
_analyticsLogObject.Type = "Action"; _analyticsLogObject.Type = "Action";
_analyticsLogObject.FileId = resourceId + "/" + HttpUtility.UrlDecode(path)[1..]; _analyticsLogObject.FileId = resourceId + "/" + HttpUtility.UrlDecode(path);
_analyticsLogObject.ResourceId = resourceId; _analyticsLogObject.ResourceId = resourceId;
_analyticsLogObject.ProjectId = _projectResourceModel.GetProjectForResource(new Guid(resourceId)).ToString(); _analyticsLogObject.ProjectId = _projectResourceModel.GetProjectForResource(new Guid(resourceId)).ToString();
_analyticsLogObject.RoleId = _projectRoleModel.GetGetUserRoleForProject(new Guid(_analyticsLogObject.ProjectId), user.Id).ToString(); _analyticsLogObject.RoleId = _projectRoleModel.GetGetUserRoleForProject(new Guid(_analyticsLogObject.ProjectId), user.Id).ToString();
......