I have a website where users can upload manuals (PDF documents) for their products. Basically, they first add the product to the system and then add 1 or more manuals to that product. A manual can have multiple versions and all versions should be available in the system. In addition, manuals can contain multiple languages. That's briefly it.
This approach has always worked well, but lately we've been having customers with tons of products/manuals and already owning a system containing that data. They're not interested in manually adding all that data, they want a system to push their products and manuals to our website automatically, including updates and deletions. So it's basically a 1 direction operation from their system to our website.
I have built WEB APIs before, but it was limited and only consisted of exchanging record data, not files and certainly not a collection of data/files. So my first question would be, can I post a collection of data with a collection of files associated with that data to a WEB API?
E.g.:
- Product A
- Manual1.PDF
- Manual2.PDF
- Product B
- Manual3.PDF
- Product C
- Manual4.PDF
- Manual5.PDF
- Manual6.PDF
Can I post this data and still associate Maual1.PDF with Product A on the server? Should I avoid trying to send as much associated data crammed into 1 POST? Should I force the client to only send 1 product with its manuals one by one, to avoid running into long HTTP requests? Any tips in general how I should be doing this?
In the past, we would build synchronization systems using FTP to upload all the PDF documents and 1 XML file that contained all the data and a reference to its associated PDF document. A job on the server would look for an uploaded XML file and process it when found. While this does work, I feel like this is an outdated solution and not really a professional approach.
Edit: Perhaps I wasn't clear enough in my description, but what I'm looking for is an interface that I will build on top of my website, which my customers can integrate in their software to push data automatically to my website whenever they make a change in their system. I want to build this interface in the ASP.NET WEB API technology, but I'm not experienced enough in that technology to determine if it is capable of what I described above: accepting files and nested data refering to those files in 1 post. And that maybe, a solution where the customer's system automatically uploads the files along with an index file through FTP would be better suited? Or a different technology?