Skip to content

Commit

Permalink
fix(server): Fix use of deprecated api for file uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Jan 8, 2019
1 parent 108f06e commit b890a0c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/src/service/services/asset.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export class AssetService {
* Create an Asset based on a file uploaded via the GraphQL API.
*/
async create(input: CreateAssetInput): Promise<Asset> {
const { stream, filename, mimetype } = await input.file;
const { createReadStream, filename, mimetype } = await input.file;
const stream = createReadStream();
return this.createAssetInternal(stream, filename, mimetype);
}

Expand Down

0 comments on commit b890a0c

Please sign in to comment.