<string name="preview_image_error_unknown_format">This image cannot be shown</string>
<string name="error__upload__local_file_not_copied">%1$s could not be copied to %2$s local folder</string>
+ <string name="prefs_instant_upload_path_title">Upload Path</string>
<string name="share_link_no_support_share_api">Sorry, sharing is not enabled on your server. Please contact your
administrator.</string>
android:disableDependentsState="true"
android:title="@string/instant_upload_on_wifi"
android:key="instant_upload_on_wifi"/>
+ <EditTextPreference android:dependency="instant_uploading"
+ android:disableDependentsState="true"
+ android:title="@string/prefs_instant_upload_path_title"
+ android:defaultValue="@string/instant_upload_path"
+ android:key="instant_upload_path"/>
<com.owncloud.android.ui.CheckBoxPreferenceWithLongTitle android:key="instant_video_uploading"
android:title="@string/prefs_instant_video_upload"
android:summary="@string/prefs_instant_video_upload_summary"/>
</PreferenceCategory>
-</PreferenceScreen>
\ No newline at end of file
+</PreferenceScreen>
import android.annotation.SuppressLint;
import android.content.Context;
+import android.content.SharedPreferences;
+import android.preference.PreferenceManager;
import android.net.Uri;
import android.os.Environment;
import android.os.StatFs;
}
public static String getInstantUploadFilePath(Context context, String fileName) {
- String uploadPath = context.getString(R.string.instant_upload_path);
+ SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
+ String uploadPathdef = context.getString(R.string.instant_upload_path);
+ String uploadPath = pref.getString("instant_upload_path", uploadPathdef);
String value = uploadPath + OCFile.PATH_SEPARATOR + (fileName == null ? "" : fileName);
return value;
}
return file;
}
-}
\ No newline at end of file
+}