如何将图像作为字节数组从C#作为客户端发送到Php [英] How Do I Send An Image As A Byte Array From C# As Client To Php

查看:81
本文介绍了如何将图像作为字节数组从C#作为客户端发送到Php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿guyz!,所以我正在开发一个xamarin应用程序,我想将图像作为字节数组上传到php脚本进行处理,因为,我想首先从其路径调整图像大小然后上传。我知道我可以使用webclient类,但它没有字节数组上传文件路径的方法

Hey guyz!, So I am developing a xamarin app and I want to upload images as a byte array to a php script for processing because, I want to first resize the image from its path and then upload. I know I could use webclient class, but it has no method for byte array upload only file path

推荐答案

你可以使用其中一个上传数据方法 [ ^ ]。
You can use one of the UploadData methods[^].


非常感谢大家。但我找到了一种方法,使用system.net.http命名空间中的httpclient类...它不仅可以选择文件,还可以选择单个上传的基本字符串数据。
Thanks very much everybody. But I found a way, using the httpclient class in the system.net.http namespace ...It gave me option of not only file, but also basic string data with a single upload.


这篇关于如何将图像作为字节数组从C#作为客户端发送到Php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆