Android 如何使用php和mysql将视频上传到服务器?
如何将视频上传到使用MySQL的PHP服务器 现在,我可以上传图像到服务器上,但如何才能添加上传视频功能 这是我的密码Android 如何使用php和mysql将视频上传到服务器?,android,video,android-recyclerview,okhttp,Android,Video,Android Recyclerview,Okhttp,如何将视频上传到使用MySQL的PHP服务器 现在,我可以上传图像到服务器上,但如何才能添加上传视频功能 这是我的密码 <ImageView android:id="@+id/image" android:layout_width="match_parent" android:layout_height="wrap_content"
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@id/status_edit"
android:layout_centerInParent="true"
android:layout_marginTop="10dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bg_proper"/>
<VideoView
android:id="@+id/video"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentStart="true"
android:layout_below="@id/status_edit"
android:layout_centerInParent="true"
android:layout_marginTop="10dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/bg_proper"/>
如果我选择视频,如何将其设置为视频视图?当我上传数据时,我需要什么
在图像中,我需要将字符串转换为位图。那么在视频中,我可以转换吗
private void uploadImage(){
String userID = getID;
String image = convertToString();
String imageName = statusEdit.getText().toString();
String sp2 = sp.getText().toString();
String tag = tags.getText().toString();
我可以将视频大小或时间设置为30秒以下吗?如果您可以以正确的方式上载图像文件(不要与位图等混淆),则可以上载任何文件。但您不显示任何上载代码<代码>字符串图像=convertToString()代码>嗯,这看起来是错误的。但是大概我们不知道你把什么转换成字符串。结果是base64吗?@blackapps是的,是base64格式。
private void uploadImage(){
String userID = getID;
String image = convertToString();
String imageName = statusEdit.getText().toString();
String sp2 = sp.getText().toString();
String tag = tags.getText().toString();