teşekkür ederim hocam bir araştırayım
beceremedim
aşağıda ki gibi yaptım ama nedense bir sorun var bilgiyi göndermiyor
public void yenigonder() {
String url = UPLOAD_URL;
File file = new File(picturePath);
// File file = new File("storage/sdcard0/WhatsApp/Media/WhatsApp Images/IMG-20170120-WA0002.jpg");
try {
FileInputStream fs1 = new FileInputStream(file);
Log.e("Bilgi", "stream yapildi");
} catch (FileNotFoundException e) {
e.printStackTrace();
Log.e("Bilgi", "stream yapilamadi");
}
Log.e("Bilgi", "gönderme başlıyor");
Log.e("Bilgi", "Dosya adı:"+file.getName());
Log.e("Bilgi", "Dosya adresi:"+file.getPath());
Log.e("Bilgi", "post adresi:"+url);
try {
Document document = Jsoup.connect(url)
.data("user", "user")
.data("password", "12345")
.data("email", "info@tutorialswindow.com")
.data("file", file.getName(), fs1 )
.post();
Log.e("Bilgi", "post gitti");
} catch (IOException e) {
e.printStackTrace();
Log.e("Bilgi", "hata oldu");
}
}bunlarda bu kısmın logları
01-24 21:47:26.713 32690-32690/com.example.oktay.kayanmenu E/Bilgi: stream yapildi
01-24 21:47:26.714 32690-32690/com.example.oktay.kayanmenu E/Bilgi: gönderme başlıyor
01-24 21:47:26.714 32690-32690/com.example.oktay.kayanmenu E/Bilgi: Dosya adı:SAM_0079.JPG
01-24 21:47:26.714 32690-32690/com.example.oktay.kayanmenu E/Bilgi: Dosya adresi:/storage/sdcard0/duzenlenen/output/SAM_0079.JPG
01-24 21:47:26.715 32690-32690/com.example.oktay.kayanmenu E/Bilgi: post adresi:http://diyetisyensirlari.com/mobil/mobil.php
01-24 21:47:26.779 32690-32690/com.example.oktay.kayanmenu E/Bilgi: hata oldu
çok mu yanlış yaptım anlamadım
http://stackoverflow.com/questions/7...es-using-jsoup
bu linkteki cevaplar gibi yapmayı denedim ama aynı bu şekilde yapınca
android studio new FileInputStream(file) ifadesinin altını ciziyor. alt enter yapınca try içine alıyor