Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 779bb5a1 authored by Robin Tissot's avatar Robin Tissot
Browse files

Fixes pdf import adding import_src prefix to filenames.

parent 127b95d0
No related branches found
No related tags found
No related merge requests found
......@@ -96,7 +96,7 @@ class PdfParser(ParserDocument):
dpi=300,
access='sequential')
part = DocumentPart(document=self.document)
fname = '%s_page_%d.png' % (self.file.name, page_nb+1)
fname = '%s_page_%d.png' % (self.file.name.rsplit('/')[-1], page_nb+1)
part.image.save(fname, ContentFile(page.write_to_buffer('.png')))
part.original_filename = fname
part.save()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment