我有一个webApp,我试图让用户上传图片。
我在TraceWebFilter
中的代码是:
@Override
public void onClick(View view) {
if(bitmap==null){
Toast.makeText(getApplicationContext(), "Image photo is not yet set", Toast.LENGTH_LONG).show();
}
else {
Matrix matrix = new Matrix();
ivImageProduct.setScaleType(ImageView.ScaleType.MATRIX); //required
matrix.postRotate(90,ivImageProduct.getDrawable().getBounds().width()/2,ivImageProduct.getDrawable().getBounds().height()/2);
Bitmap bmp=Bitmap.createBitmap(bitmap, 0, 0,bitmap.getWidth(), bitmap.getHeight(), matrix, true);
bitmap.recycle();
bitmap=bmp;
ivImageProduct.setImageBitmap(bitmap);
}
}
但它显示错误:
上传的文件超出了提交表单允许的最大尺寸。
但是当我尝试在不使用其他webapp的PHP的情况下上传同一个文件时,它会上传。
答案 0 :(得分:-1)
您必须更改$ config [' max_size'] =' 0&#39 ;;任何其他尺寸,如$ config [' max_size'] =' 100';