[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 403
  • Last Modified:

Creating a ZIP File from List<Image> in silverlight

In my SL4 app, I'm pulling in a zip file from the server, extracting the contents (Using SharpGIS), which are all image files, into a List<Image> and binding this to an image slideshow. This all works great.

I now need to do things the other way round. I have the code and UI in Place to add an image file to the List<Image>, I need to be able to then upload the changed image set back to the server, and replace the existing ZIP file with the new contents.

So, what is the best way to do this. I can see 3 options:

1) Handle the ZIP in SL (somehow) and upload the zip file to my WCF service to be saved
2) Upload the List<Image> to the WCF Service, extract each image, and create the ZIP file at the service
3) Convert the Images to Bytes and upload a file at a time to the WCF Service (Could be 50+ images)

Anyone get any ideas what is the best method?
0
wint100
Asked:
wint100
  • 2
  • 2
1 Solution
 
John ClaesCommented:
you want to Add an Image to the Zipfile?

then you should only send the image to the server, and do the adding overthere.
SharpGis will allow you over there to add the Image on a easy way.

regards
poor beggar
0
 
wint100Author Commented:
My main issue is how to get ALL of the Images from the List<Image>, to the server. Or shall I simply pass the List to the server, and handle everything there? Would this bloat the process at all, as a 1MB JPG could bloat up to 60+MB when loaded into memory.
0
 
John ClaesCommented:
This is gone go wild !!

I would suggest sending Image by Image ....
So this way the server can add them directly when the user is adding them...
0
 
wint100Author Commented:
Hi,

I've now started to use the Upload control (which is free!) from www.vectorlight.net, this makes the whole upload process very easy.

I've also limited the number of files uploaded to those that have changed, or been added.

Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now