Skip to content

Series import: downloaded file isn't get removed when exception happens #1259

Open
@php-coder

Description

@php-coder

When import has failed (because of a seller wasn't specified: #1218), the downloaded file doesn't get removed:

r.m.web.feature.image.ImageServiceImpl   : Image info has been saved to database (ImageInfoDto(id=326, type=JPEG))
w.f.i.FilesystemImagePersistenceStrategy : Image data has been written into file /data/uploads/326.jpeg
r.m.web.feature.image.ImageServiceImpl   : Series #257: image #326 was added
r.m.w.feature.series.SeriesServiceImpl   : Series #257 has been created (AddSeriesDbDto(categoryId=1, countryId=36, quantity=18, perforated=true, michelPrice=null, scottPrice=null, yvertPrice=null, gibbonsPrice=null, solovyovPrice=null, zagorskiPrice=null, releaseDay=null, releaseMonth=null, releaseYear=1995))
org.eclipse.jetty.server.HttpChannel     : /series/import/request/49

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalArgumentException: Seller id must be non null
mystamps@my-stamps:~$ ll /data/uploads/326.jpeg
-rw-r--r-- 1 mystamps mystamps 83672 Feb 19 02:09 /data/uploads/326.jpeg

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions