fix getUserImg con path relativo/assoluto
This commit is contained in:
+11
-1
@@ -919,7 +919,17 @@ namespace MConnectSDK
|
||||
try
|
||||
{
|
||||
string imgEncoded = Uri.EscapeDataString(imagePath);
|
||||
string fullImgPath = pageURL + imgEncoded + "?alt=media";
|
||||
string fullImgPath = "";
|
||||
// se ho imagePath che inizia per http --> assoluto, altrimenti faccio un inserimento PRE della pageURL
|
||||
if (imgEncoded.StartsWith("http"))
|
||||
{
|
||||
fullImgPath = imgEncoded + "?alt=media";
|
||||
}
|
||||
else
|
||||
{
|
||||
fullImgPath = pageURL + imgEncoded + "?alt=media";
|
||||
}
|
||||
|
||||
using (Stream response = await cHttpClient.GetStreamAsync(fullImgPath).ConfigureAwait(false))
|
||||
{
|
||||
//if()
|
||||
|
||||
Reference in New Issue
Block a user