G
G
GaserV2021-04-15 18:41:18
React
GaserV, 2021-04-15 18:41:18

How to send a file back to the back if just an object with information about the file comes from there?

Such situation. When creating a post - in addition to data, there are attachments. What about updating a post? How can I send a file, if there is only information about it, the file itself is, in fact, as if not (it lies in the storage)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis, 2021-04-15
@sidni

If the file can be attached to the post alone, then nothing needs to be done, the new file has come to replace the old one, if there are attachment files, then add the names of the files that the user wants to replace (delete) into a separate array and send them to the back, he will delete them, and those files that come he will add to the post

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question