This repository has been archived by the owner on Apr 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Fix #104: Add support for the attachment API. #115
Merged
Merged
Changes from 6 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
62dd05f
Fix #104: Add support for the attachment API.
n1k0 2a02003
WIP - **dirty** code that works
leplatrem 444b8d3
Install kinto-attachment
leplatrem a91c648
Do not enforce headers at http client level
leplatrem 7fb4652
Lint
leplatrem d5b2b87
Move test polyfill to setup-jsdom
leplatrem 11819fd
Fixed tests, reintroduced default headers merging.
n1k0 779bdd5
Lint.
n1k0 d967aa3
Code clean.
n1k0 55ad8a7
Update docs (WiP)
n1k0 5975255
Add missing link in docs.
n1k0 fb97df2
Add Collection#removeAttachment.
n1k0 e06367d
Add check for attachment capability.
n1k0 92ff0f1
Fix up tests for capable decorator
leplatrem b51c879
Refactor to gather request building to requests.js
leplatrem 97a8229
Remove usage of update request
leplatrem ead5d97
Support filename as option
leplatrem 845a5e4
Add unit tests for extractFileInfo.
n1k0 a1de492
Factorize prepublish command.
n1k0 fe1ccc9
Fix coverage related commands.
n1k0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const jsdom = require("jsdom"); | ||
|
||
// Setup the jsdom environment | ||
// @see https://github.com/facebook/react/issues/5046 | ||
global.document = jsdom.jsdom("<!doctype html><html><body></body></html>"); | ||
global.window = document.defaultView; | ||
global.navigator = global.window.navigator; | ||
global.Blob = global.window.Blob; | ||
global.FormData = global.window.FormData; | ||
|
||
// btoa polyfill for tests | ||
global.btoa = require("btoa"); | ||
global.atob = require("atob"); | ||
|
||
|
||
global.FormData = require("form-data"); | ||
global.Blob = function(sequences) { return Buffer.from(sequences[0]); }; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add
@capable
decorator