Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Add TUS support information on FileInfo object #461

Merged
merged 1 commit into from
Apr 23, 2020
Merged

Conversation

PVince81
Copy link

@PVince81 PVince81 commented Apr 22, 2020

Whenever a list() or fileInfo() call response contains TUS headers,
return these through the fileInfo.getTusSupport() method.

If no TUS headers are found, that method returns null.

Fixes #458

  • unit tests
  • test against actual backend

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #461 into master will increase coverage by 0.36%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #461      +/-   ##
==========================================
+ Coverage   80.40%   80.76%   +0.36%     
==========================================
  Files          43       43              
  Lines        3654     3712      +58     
==========================================
+ Hits         2938     2998      +60     
+ Misses        716      714       -2     
Impacted Files Coverage Δ
src/fileInfo.js 80.00% <100.00%> (+1.42%) ⬆️
src/fileManagement.js 87.65% <100.00%> (+0.15%) ⬆️
src/helperFunctions.js 86.88% <100.00%> (+1.54%) ⬆️
tests/filesTest.js 82.87% <100.00%> (+2.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a23283...9286d2d. Read the comment docs.

@PVince81
Copy link
Author

PVince81 commented Apr 22, 2020

I've re-read the spec and apparently only "Tus-Version" MUST be set and not the others.

  • rely on "Tus-Version" instead of "Tus-Resumable" to detect if TUS is set at all

Whenever a list() or fileInfo() call response contains TUS headers,
return these through the fileInfo.getTusSupport() method.

If no TUS headers are found, that method returns null.
@PVince81
Copy link
Author

adjusted, please review

@PVince81 PVince81 merged commit 6cb7806 into master Apr 23, 2020
@delete-merged-branch delete-merged-branch bot deleted the tus-detect-support branch April 23, 2020 08:35
xoxys pushed a commit that referenced this pull request Apr 23, 2020
Merge: 9a23283 9286d2d
Author: Vincent Petry <pvince81@owncloud.com>
Date:   Thu Apr 23 10:35:06 2020 +0200

    Merge pull request #461 from owncloud/tus-detect-support

    Add TUS support information on FileInfo object
xoxys pushed a commit that referenced this pull request Apr 23, 2020
Merge: 9a23283 9286d2d
Author: Vincent Petry <pvince81@owncloud.com>
Date:   Thu Apr 23 10:35:06 2020 +0200

    Merge pull request #461 from owncloud/tus-detect-support

    Add TUS support information on FileInfo object
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose TUS capability of a resource
2 participants