Skip to content

Commit

Permalink
🐛 Fix: auto generate a local png bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Molunerfinn committed Feb 23, 2020
1 parent 12ec75d commit c54ac67
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/utils/getURLFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import PicGo from '../core/PicGo'
import request from 'request'
import path from 'path'
import { IPathTransformedImgInfo } from './interfaces'
import fs from 'fs'

export const getURLFile = async (ctx: PicGo, url: string): Promise<IPathTransformedImgInfo> => {
const requestOptions = {
Expand All @@ -26,7 +25,6 @@ export const getURLFile = async (ctx: PicGo, url: string): Promise<IPathTransfor
})
clearTimeout(timeoutId)
if (isImage) {
fs.writeFileSync('./logo.png', res)
resolve({
buffer: res,
fileName: path.basename(requestOptions.url.split('?')[0]),
Expand Down

0 comments on commit c54ac67

Please sign in to comment.