Пример #1
0
 public void UploadImage(ImageUploadRequest data)
 {
     // Stocker l’image en BDD
     byte[] imageBytes = null;
     MemoryStream imageStreamEnMemoire = new MemoryStream();
     data.ImageData.CopyTo(imageStreamEnMemoire);
     imageBytes = imageStreamEnMemoire.ToArray();
     bdAccess.addImage(data.ImageInfo.ID, data.ImageInfo.idAlbum, imageBytes);
     imageStreamEnMemoire.Close();
     data.ImageData.Close();
 }
Пример #2
0
        public void UploadImage(ImageUploadRequest data)
        {
            // Stocker l’image en BDD
            byte[]       imageBytes           = null;
            MemoryStream imageStreamEnMemoire = new MemoryStream();

            data.ImageData.CopyTo(imageStreamEnMemoire);
            imageBytes = imageStreamEnMemoire.ToArray();
            bdAccess.addImage(data.ImageInfo.ID, data.ImageInfo.idAlbum, imageBytes);
            imageStreamEnMemoire.Close();
            data.ImageData.Close();
        }