|
|
|
|
148
|
try {
|
148
|
try {
|
149
|
String[] proj = {MediaStore.Images.Media.DATA};
|
149
|
String[] proj = {MediaStore.Images.Media.DATA};
|
150
|
cursor = context.getCurrentActivity().getContentResolver().query(selectedVideoUri, proj, null, null, null);
|
150
|
cursor = context.getCurrentActivity().getContentResolver().query(selectedVideoUri, proj, null, null, null);
|
151
|
- if (cursor == null) uploadFilePath = selectedVideoUri.getPath();
|
|
|
152
|
- int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
|
|
153
|
- cursor.moveToFirst();
|
|
|
154
|
- uploadFilePath = cursor.getString(column_index);
|
|
|
|
|
151
|
+ if (cursor == null) {
|
|
|
152
|
+ uploadFilePath = selectedVideoUri.getPath();
|
|
|
153
|
+ } else {
|
|
|
154
|
+ int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
|
|
|
155
|
+ cursor.moveToFirst();
|
|
|
156
|
+ uploadFilePath = cursor.getString(column_index);
|
|
|
157
|
+ }
|
155
|
} catch (Exception e) {
|
158
|
} catch (Exception e) {
|
156
|
uploadFilePath = FileUtils.getFilePathFromURI(context.getCurrentActivity(), selectedVideoUri);
|
159
|
uploadFilePath = FileUtils.getFilePathFromURI(context.getCurrentActivity(), selectedVideoUri);
|
157
|
} finally {
|
160
|
} finally {
|