|
@@ -87,8 +87,6 @@ public class FileBrowserController : MonoBehaviour, IPointerDownHandler
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
private IEnumerator OutputRoutine(string url)
|
|
private IEnumerator OutputRoutine(string url)
|
|
{
|
|
{
|
|
//var loader = new WWW(url);
|
|
//var loader = new WWW(url);
|
|
@@ -162,8 +160,9 @@ public class FileBrowserController : MonoBehaviour, IPointerDownHandler
|
|
else
|
|
else
|
|
{
|
|
{
|
|
file_name = Path.GetFileName(url);
|
|
file_name = Path.GetFileName(url);
|
|
- form.AddBinaryData("file", File.ReadAllBytes(url), file_name);
|
|
|
|
- www = UnityWebRequest.Post($"http://dev.prmsys.net/areditortest/StreamingAssets/upload.php", form);
|
|
|
|
|
|
+ var bytes = File.ReadAllBytes(url);
|
|
|
|
+ form.AddBinaryData("file", bytes, file_name);
|
|
|
|
+ www = UnityWebRequest.Post($"http://dev.prmsys.net/positionviewer/StreamingAssets/upload.php", form);
|
|
}
|
|
}
|
|
yield return www.SendWebRequest();
|
|
yield return www.SendWebRequest();
|
|
if (www.isHttpError)
|
|
if (www.isHttpError)
|
|
@@ -171,7 +170,7 @@ public class FileBrowserController : MonoBehaviour, IPointerDownHandler
|
|
else
|
|
else
|
|
{
|
|
{
|
|
Debug.Log("Uploaded");
|
|
Debug.Log("Uploaded");
|
|
- inputField.text = $"{Application.streamingAssetsPath}/Targets/{file_name}";
|
|
|
|
|
|
+ inputField.text = $"{Application.streamingAssetsPath}/{file_name}";
|
|
}
|
|
}
|
|
Debug.Log(www.downloadHandler.text);
|
|
Debug.Log(www.downloadHandler.text);
|
|
}
|
|
}
|