Like sait in the question. I am posting a array of files to my DRF backend. I would like to include some additional informations to some of the files being send. The simplest possible solution would be to append additional info to the file itself, although when I try attaching additional attribute to the file object in JavaScript, Python still receives the same standard TemporaryUploadedFile which does not include the additional data. Is there a reliable solution to this problem ?
Asked
Active
Viewed 24 times
0
-
i think what you looking for is adding metadata to a file, you can take a look at this answer https://stackoverflow.com/a/56399698/11225821 – Linh Nguyen Feb 10 '22 at 10:11
-
@LinhNguyen this solution implies adding metadata to the file on the Django side while I need to append the data in a JavaScript request, and receive it in a Django view – kenshin Feb 10 '22 at 10:22
-
you can also add it on js side too, just google for how to add metadata to a file. Metadata itself is always present in a file – Linh Nguyen Feb 10 '22 at 10:23