Should I ask a question which needs a long answer or divide it into many questions?
Basically, if your question can be broken down into completely independent and individually answerable components, then it definitely should be. In fact, some parts of your question may have been already answered on the site.
If you find that you're in a situation where your question would require a very long answer, then it is possible that you need to go back to the drawing board and re-evaluate your design. Walk through all the steps of what you are trying to accomplish, and if they cannot be broken down into unrelated components, then you should refactor your ideas so that they can be.
Even in very procedural code where every line of code depends on the section before it, you will find that it can be broken down into elevating steps. Then you can ask a separate coherent question about each of the steps that you still have issues with.
For example, if you are talking about sending files in a certain language, and integrating a certain framework, and using a certain paradigm or design pattern. You would ask three questions for each of those pieces, and within those questions you should link to the others.