Ignore:
Timestamp:
Jul 29, 2011, 6:05:05 PM (13 years ago)
Author:
bayral
Message:

MAj des truc existant et debut du upload de fichier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PiwigoLib/TestPiwigoLib/Form1.cs

    r7149 r11850  
    44using Com.Piwigo.Lib.IService;
    55using Com.Piwigo.Lib.DTO;
     6using System.Collections.Generic;
     7using System.IO;
    68
    79
     
    2325            UriBuilder urib = new UriBuilder();
    2426            urib.Host = tbServer.Text;
    25             urib.Path = "phpwebgallery/ws.php";
     27            urib.Path = "/ws.php";
    2628            urib.Scheme = "http://";
    2729
     
    6062                //List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory();
    6163
    62                 //Int32 newid = 0;
    63                 //String msg = String.Empty;
    64                 //Boolean rc = PwgServiceProvider.Instance.PwgCategoriesService.AddCategory("test_cat", 1, ref  newid, ref msg);
     64                Int32 newid = 0;
     65                String msg = String.Empty;
     66                Boolean rc;
     67                // rc = PwgServiceProvider.Instance.PwgCategoriesService.AddCategory("test_cat", 1, ref  newid, ref msg);
     68                //List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory();
    6569                //Console.WriteLine(String.Format("newid : {0} message : {1}", newid,msg));
    6670                //rc = PwgServiceProvider.Instance.PwgCategoriesService.UpdateCategoryInfo(newid, "test2", "rename cat");
     71                //Boolean rc = PwgServiceProvider.Instance.PwgCategoriesService.DeleteCategory(newid, sess.SecurityToken, PwgCategoryPhotoDeletionModeEnum.None);
     72                //rc = PwgServiceProvider.Instance.PwgCategoriesService.MoveCategory(new List<Int32>() { newid }, PwgCategory.RootCategoryId, sess.SecurityToken);
    6773
    68                 PwgImageRate imgRate = PwgServiceProvider.Instance.PwgImagesService.RateImage(1, 5);
     74                //lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory();
     75
     76                FileInfo fi = new FileInfo("C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n.jpg");
     77                rc = PwgServiceProvider.Instance.PwgImagesService.addImageByMultiPartForm(fi, null, 1, "benoit", "byarl", "test upload", 0, null);
     78
     79                //PwgImageRate imgRate = PwgServiceProvider.Instance.PwgImagesService.RateImage(1, 5);
    6980
    7081                sess = PwgServiceProvider.Instance.PwgSessionService.Logout();
Note: See TracChangeset for help on using the changeset viewer.