I'm facing problem in building api for uploading multiple files. I've divide multiple file upload into single upload for each file ( api call per file ). But How to connect all files.
Post Table: ( id, caption )
PostAttachment : ( id, post_id, image )
Scenario : Uploading 20 photos with caption "SOME_TEXT". For the first file Post will be added with one PostAttachment and for later files PostAttachment will be append with previous post_id.