- Timestamp:
- Jul 29, 2011, 6:05:05 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoLib/PiwigoLib/Service/PwgImagesService.cs
r7149 r11850 9 9 using Com.Piwigo.Lib.DTO.Helper; 10 10 using Com.Piwigo.Lib.IService; 11 using System.IO; 11 12 12 13 namespace Com.Piwigo.Lib.Service … … 44 45 { 45 46 throw new PwgServiceException("RateImage : a error is raised by proxy.", ex); 47 } 48 return returnValue; 49 } 50 51 public Boolean addImageByMultiPartForm(FileInfo fileImage, Int32? imageId, Int32? categoryId, String imageName, String imageAuthor, String imageComment, Int32? imageLevel, String imageTags) 52 { 53 Boolean returnValue = false; 54 55 try 56 { 57 PwgBaseProxyReponse response = PwgImagesProxy.pwg_images_addSimple(fileImage,imageId, categoryId, imageName, imageAuthor, imageComment, imageLevel, imageTags ); 58 59 if (response.Retour != PwgBaseProxyReponseRetourEnum.Ok) 60 { 61 if (response.Erreur != null) 62 { 63 throw new PwgServiceException("addImageByMultiPartForm, the server has return the error.", 64 response.Erreur.Code, 65 response.Erreur.Message); 66 } 67 else 68 { 69 throw new PwgServiceException("addImageByMultiPartForm : a error occurs during server process."); 70 } 71 } 72 else 73 { 74 returnValue = true; 75 } 76 } 77 catch (PwgProxyException ex) 78 { 79 throw new PwgServiceException("addImageByMultiPartForm : a error is raised by proxy.", ex); 46 80 } 47 81 return returnValue;
Note: See TracChangeset
for help on using the changeset viewer.