I am creating a flex collection in which as model I have an array collection of slides.Each of the slide has a set of ob开发者_JAVA百科jects like array of images , array of captions etc . I want to pass these slides to the web service coded using asp.net and C# , from where it will be saved to a sql server db. Is there a way to send the image Array directly to the web service or I have to send each of the image separately by making as many calls to the web service as the number of images in the array .
In general what would be the most efficient way to send these array of slides and the associated objects to the web service so that they could be stored in the database ?
Well, depending on that kind of data, you need to figure out the data transfer protocol. You could use something like JSON to encode your data and send it over, but it really depends on what kind of data you want to send.
The other alternative is using AMF with a RemoteObject call. You can use AMF.Net so that your server end knows what it is.
I can't speak on your behalf since I don't know all the specs, but you need to choose what's the better approach for your dataset.
I am not sure about How to save Complete Model With multiple Files, but You can generate request to upload Multiple Files in one go from Flex using FileReferenceList class plz ck link
Working with file upload and download
hopes that helps
You're going to need to serialize your data in some way so that it can be saved in your DB. Although if your images files are big you might not want to store them directly in the DB. Anyway, it shouldn't be a problem to use a RemoteCall like J_A_X suggested or even to archive the image files together and send them in one call as one big chunk.
精彩评论