PDF File Update


Is there a way to load in an already loaded in PDF file to the template? The PDF is already correctly saved in the database, but I want to be able to edit it.

So when a person clicks on edit it should display the PDF’s that are already loaded in for that item (They’re connected with each other through FK’s).
I want to do this through JQuery.

What would be the simplest way?

My models.py:

class FileUpload(models.Model):
    file = models.FileField(upload_to='files/', blank=True, null=True, default = None)
    factuur = models.ForeignKey(Facturen, on_delete=models.CASCADE, related_name="referentie_facturen3", blank=True, null = True)

    def delete(self, *args, **kwargs):
        super().delete(*args, **kwargs)
class Facturen(models.Model):
    leverancierFactuur = models.CharField(max_length=250, default="")
    factuurNummer = models.CharField(max_length=250, default="", unique=True)
    datumFactuur = models.DateField(null=True)
    privaatTankstation = models.BooleanField(default = False)
    eigenOpslag = models.BooleanField(default = False)
    leveringsDatum = models.DateField(null=True)
    file = models.FileField(upload_to='files/', blank=True, null=True, default = None)
    boekingsNummer = models.CharField(max_length=250, default="")

    leverancierRef = models.ForeignKey(Leveranciers, on_delete=models.CASCADE, related_name="referentie_facturen")

    def delete(self, *args, **kwargs):
        super().delete(*args, **kwargs)

My update template where I want to load them in:

<div class="col-6">
                        <input id="fileinput" type="file" name="file[]" multiple />
                        <table id="holder" class="w-100 h-100">
                            <td>Vergeet niet uw PDF's opnieuw in te slepen bij een update</td>
                                <ul id="fileList">

Exactly how are you planning to edit a pdf using jQuery? (How you are going to visualize that pdf in a page without using the browser’s pdf display facility will affect your options.)