Support SVG (#3883)
* Update add-file.ts * Update package.json * Revert "Update add-file.ts" This reverts commit ba0fe83b54a44493447208dfb3cc304a60df6fdd. * Update add-file.ts * Update package.json * Update add-file.ts * Update add-file.ts * Create image.svg * Update api.ts
This commit is contained in:
parent
00d5fdfc13
commit
018837db0b
4 changed files with 21 additions and 1 deletions
14
test/api.ts
14
test/api.ts
|
@ -808,6 +808,20 @@ describe('API', () => {
|
|||
|
||||
expect(res).have.status(400);
|
||||
}));
|
||||
|
||||
it('SVGファイルを作成できる', async(async () => {
|
||||
const izumi = await signup({ username: 'izumi' });
|
||||
|
||||
const res = await assert.request(server)
|
||||
.post('/drive/files/create')
|
||||
.field('i', izumi.token)
|
||||
.attach('file', fs.readFileSync(__dirname + '/resources/image.svg'), 'image.svg');
|
||||
|
||||
expect(res).have.status(200);
|
||||
expect(res.body).be.a('object');
|
||||
expect(res.body).have.property('name').eql('image.svg');
|
||||
expect(res.body).have.property('type').eql('image/svg+xml');
|
||||
}));
|
||||
});
|
||||
|
||||
describe('drive/files/update', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue