Trigger media scan after file upload
authorSean <sean.dunne1988@gmail.com>
Thu, 15 Jan 2015 19:46:44 +0000 (19:46 +0000)
committerSeán Dunne <sean.dunne@ericsson.com>
Thu, 18 Jun 2015 14:42:06 +0000 (15:42 +0100)
After a successful upload, the uploaded file is saved locally on the
device but the media scan was not getting triggered.

src/com/owncloud/android/files/services/FileUploader.java

index 8beff92..eb33b37 100644 (file)
@@ -727,6 +727,7 @@ public class FileUploader extends Service
         }
         file.setNeedsUpdateThumbnail(true);
         mStorageManager.saveFile(file);
+        mStorageManager.triggerMediaScan(file.getStoragePath());
     }
 
     private void updateOCFile(OCFile file, RemoteFile remoteFile) {