Sharp: Can't delete temp file after crop and save

Created on 11 Jun 2018  Â·  2Comments  Â·  Source: lovell/sharp

I am cropping an input image and then saving it to output file. but i want to remove the input one.

sharp(input)
.extract({ left: data.left, top: data.top, width: data.width, height: data.height })
.toFile(output, (err) => {
if(err){…
}else{
fs.unlink(input)….
}
});

When i try to unlink the temporal file node shows:
Error: EBUSY: resource busy or locked, unlink….

question

Most helpful comment

All 2 comments

See also #415

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AVVS picture AVVS  Â·  3Comments

janaz picture janaz  Â·  3Comments

genifycom picture genifycom  Â·  3Comments

jaydenseric picture jaydenseric  Â·  3Comments

kachurovskiy picture kachurovskiy  Â·  3Comments