hey Ich benutze unten Code in meiner Android App. Es werden Bilder erfolgreich auf den kinvey-Server hochgeladen. Wenn ich jedoch versuche, es über den Download-Link http://storage.googleapis.com/6e1e6118eb264d42902a4b280cd5aa7b/myFile/abc.jpg unter kinvey unter Dateisammlungen zu öffnen, wird Folgendes angezeigt: "Diese XML-Datei scheint keine Formatinformationen zu enthalten. Die Dokumentstruktur wird angezeigt unten.wie Bilder auf Kinvey-Server hochladen und herunterladen
<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
</Error>
und wenn ich versuche, die Datei herunterladen, zeigt es Blob nicht gefunden, ich weiß nicht, wo das Problem ist, könnten Sie es bitte darauf hin, habe ich den Download-Log weiter unten .. .. dank im Voraus
das ist mein Bild-Upload-Code
das ist meine Bilder Download Code
public void download() {
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + "/aa11.jpg");
try {
FileOutputStream fos = new FileOutputStream(file);
DownloaderProgressListener dpl=new DownloaderProgressListener() {
@Override
public void progressChanged(MediaHttpDownloader mediaHttpDownloader) throws IOException {
System.out.println("progress updated: "+mediaHttpDownloader.getDownloadState());
}
@Override
public void onSuccess(Void aVoid) {
System.out.println("successfully download file");
}
@Override
public void onFailure(Throwable throwable) {
// System.out.println("failed to download file :->"+throwable.getCause());
System.out.println("failed to download file :->"+throwable.getLocalizedMessage());
System.out.println("failed to download file :->"+throwable.getStackTrace());
}
};
Query myQuery=new Query();
myQuery.equals("id","myFile");
client.file().download(myQuery,fos,dpl);
}catch(Exception e)
{
System.out.println("in catch block,could'nt download file ---->"+e.getMessage());
}
}
Log Bildcode zum Download ...., zum Download I "Blob nicht gefunden" Bitte überprüfen Sie das Protokoll bekam ....
16: 09: 46,036 13.008-13.008/com.kinvey.sample.statusshare I/System.out: geht neue Datei in aa1.jpg 11-02 16 zum Download: 09: 46,051 13.008-13.341/com.kinvey.sample .statusshare I/System.out: Fortschritt aktualisiert: DOWNLOAD_IN_PROGRESS 11-02 16: 09: 46.051 13008-13341/com.kinvey.sample.status Aktie I/System.out: Fortschritt aktualisiert: INITIATION_STARTED 11-02 16: 09: 46,870 13.008-13.341/com.kinvey.sample.statusshare I/System.out: failed Datei zum Download: -> 11-02 16: 09: 46,870 13.008-13.341/com.kinvey.sample.statusshare I/System.out: Grund: BlobNotFound 11-02 16: 09: 46,870 13.008-13.341/com.kinvey.sample.statusshare I/System.out: FIX : 09: 46,870 13.008-13.341/com.kinvey.sample.statusshare I/System.out: ERKLÄRUNG: Die Datei heruntergeladen wird nicht existiert Das Blob nicht 11-02 16 für diese App Backend gefunden. 11-02 16: 09: 46,890 13.008-13.341/com.kinvey.sample.statusshare I/System.out: failed zu Download-Datei: -> [Ljava.lang.StackTraceElement; @ 33e9dd19
I Android SDK 22 jedes Mal bin mit es dieses Problem zeigt während die Dateien herunterzuladen. Upload der Datei ist in Ordnung. Während des Uploads werden keine Fehler generiert. –