hi
`
var client = new RestClient("http://api.parsaspace.com/v1/files/upload");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization","Bearer yourtoken");
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddParameter("domain","yourdomain");
request.AddParameter("path","/");
request.AddFile("file",yourfile);
IRestResponse response = client.Execute(request);
`
i test it in postman. it worked.
but when i use it in xamarin(android) it doesnt work.
i have this problem that what is "yourfile"?
i put for example "C:\\index.jpg" but it gave error that file not found.
what should i use in string path "yourfile'?
تو postmanامتحان کردم کار کرد
اما وقتی که در xamarin استفاده می کنم (اندروید) کار نمی کند.
مشکل اینه که "yourfile" چیه
برای مثال "C: \\ index.jpg" قرار دادم اما خطا داد .
چه رشته ای با چه فرمتی باید بجای yourfile بزارم؟
path مربوط به image چیه
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)