filechooser

HTML input file - how to translate “Choose File” and “No file Chosen”?

自作多情 提交于 2019-12-05 01:20:18
I know that these two words get automatically translated, due to the browser language. But my HTML is not doing that. HTML: <p> <label for="id_company_logo"> Company Logo: </label> <input type="file" name="company_logo" id="id_company_logo" /> </p> It is generated from following "form" code of django : company_logo = forms.ImageField(label=_('Company Logo'),required=False, error_messages = {'invalid':_("Image files only")}, widget=forms.FileInput) Am I doing anything wrong? I searched around for some time now, but I had absolutely no luck. Thanks in advance. Dragos This problem was disscused

TinyMCE file_picker_callback select image from default browser file selection

拥有回忆 提交于 2019-12-04 08:38:51
Im using TinyMCE in a project and want the user to select and upload images to the server using its default insert image window. I want to click the following button: Open the browsers default file select window and add the selected image to the editor: My code so far is as follows.. JS: tinymce.init({ selector: '#html-editor', language: 'pt_PT', plugins: [ "bdesk_photo advlist autolink link image lists charmap preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code media nonbreaking", "table contextmenu directionality paste textcolor colorpicker imagetools" ], add

JavaFX 2.2 Get selected file extension

蹲街弑〆低调 提交于 2019-12-03 20:44:50
I don't know how to get selected file exstesion. I have seen that developers ask this question frequently, but I could find and proper answer. I know it is a bug (fhttp://javafx-jira.kenai.com/browse/RT-18836), but anyway is there any solutions. So I wanna save my linechart as pdf or png. My code for both files works fine. But I just can't stand not to get selected file. Is there any sollution possible. I see that Java has built in function for this issue. This solution is not relevant for me: JavaFX FileChooser not returning file extension for Windows My code is: FileChooser fileChooser = new

Android Multiple File Selector/Chooser Dialog

人走茶凉 提交于 2019-12-03 07:35:46
问题 I have been scouring the internet for a simple easy to implement Android file chooser dialog that also has the option of selecting multiple files and returning a uri or string array with all the files selected. Currently I use aFileChooser on github and it is according to me better than android-file-dialog. But neither address the issue of passing multiple files. I am only an intermediate android developer but I think this would be something not so hard to implement by a pro. I have looked at

JavaFX FileChooser: how to set file filters?

寵の児 提交于 2019-12-03 01:02:30
I want to set file filters in a JavaFX FileChooser but I could not find a way to do it. My code: FileChooser fc = new FileChooser(); fc.setTitle("My File Chooser"); File f = fc.showOpenDialog(primaryStage); System.out.println(f); You could do: FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("TXT files (*.txt)", "*.txt"); chooser.getExtensionFilters().add(extFilter); Here is a simple example: public class ExtensionFilterExample extends Application { public static void main(String[] args) { launch(args); } @Override public void start(final Stage primaryStage) {

onShowFileChooser() from android webview works only once

十年热恋 提交于 2019-12-02 21:43:02
I need to pick images from the device and upload it to the server. For the first time, when I pick the images, onShowFileChooser() gets called and everything works. But, when I try to click upload again, onShowFileChooser() never gets called. But it's working for non-lollypop devices. openFileChoser() gets called, whenever I click upload. Is there anything that I'm missing. Here is my code : //Needed for file upload feature vWebView.setWebChromeClient(new WebChromeClient() { // file upload callback (Android 2.2 (API level 8) -- Android 2.3 (API level 10)) (hidden method) public void

How to extract values from FileChooserParams when onShowFileChooser() gets called?

浪子不回头ぞ 提交于 2019-12-02 01:40:37
We have a hybrid app that runs on Android and using webapp pages created in MVC. We have 2 buttons - 1. Document upload - Files, Gallery options should be available when this is clicked (no camera option) 2. Camera upload - clicking on this should trigger camera app in phone. I have following code on mvc view : <input type="file" id="uploadFile" name="files" accept=".pdf,.jpg,.jpeg,.gif,.png" style="display:none;" /> <input type="file" id="capture" name="LnFImage" accept="image/*" capture="capture" style="display:none;"> in BrowserFragment.java, we have 2 Intents: Intent takePhotoIntent = new

Enable GtkFileChooserDialog to select files OR folders

戏子无情 提交于 2019-12-02 00:21:05
问题 Using GTK+'s GtkFileChooserDialog, how can I allow the user to select a file or a folder (both are valid here). The actions available are mutually exclusive. 回答1: Unfortunately I don't think this is possible. I played around with this a bit in the "create a torrent" dialog in Transmission, and wound up using a radibox to enable one of two chooserdialogbuttons, one in file mode and the other in folder mode. 回答2: You could add another button. Here is a small example which illustrates how you

How to select folder in android?

大兔子大兔子 提交于 2019-12-01 17:32:10
Hi there is a way to select folder where user want to save file in android . I check out http://code.google.com/p/android-file-dialog/ it has functionality to select file but i want to select folder , please provide me usable link or examples. I used the same source in my app (pretty sure), and there is a block of code: protected void onListItemClick(ListView l, View v, int position, long id) { if (file.isDirectory()) { selectButton.setEnabled(false); if (file.canRead()) { lastPositions.put(currentPath, position); getDir(path.get(position)); } else { new AlertDialog.Builder(this) .setIcon(R

How to select folder in android?

六月ゝ 毕业季﹏ 提交于 2019-12-01 16:43:15
问题 Hi there is a way to select folder where user want to save file in android . I check out http://code.google.com/p/android-file-dialog/ it has functionality to select file but i want to select folder , please provide me usable link or examples. 回答1: I used the same source in my app (pretty sure), and there is a block of code: protected void onListItemClick(ListView l, View v, int position, long id) { if (file.isDirectory()) { selectButton.setEnabled(false); if (file.canRead()) { lastPositions