1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-23 03:33:29 +00:00

raw attachment saves with node form data

This commit is contained in:
Kyle Spearrin
2018-05-17 15:35:02 -04:00
parent ed89dfaba7
commit a421f6e64a
5 changed files with 56 additions and 33 deletions

View File

@@ -1,3 +1,4 @@
import * as FormData from 'form-data';
import * as fe from 'node-fetch';
import { ApiService } from './api.service';
@@ -9,6 +10,7 @@ import { TokenService } from '../abstractions/token.service';
(global as any).Request = fe.Request;
(global as any).Response = fe.Response;
(global as any).Headers = fe.Headers;
(global as any).FormData = FormData;
export class NodeApiService extends ApiService {
constructor(tokenService: TokenService, platformUtilsService: PlatformUtilsService,