Upload file from directoy path - javascript

I'm trying to upload a file on an android phone using HTML5 and Javascript. Everything works perfectly except the phone asks the user to select an app to find the file. Is there a way to skip the app selection, and force the user to select a file from the Chrome Downloads directory?
Additional Info: I am able to skip the app selection when the user downloads the file by using "data:application/octet-stream;Content-Disposition:attachment". Is there something similar for uploading a file?

Related

Can't locate on device's local storage nativescript file-system generated directory

I'm creating an audio file and it seems working fine because the indicator that it records and audio shows no error. But after the app generates the directory, I can't locate it on local storage.
I am using this code
var audioFolder = fs.knownFolders.currentApp().getFolder("audio");
This code shows
enter image description here
This what I get when I tried to locate it on local storage
enter image description here
Current app directory is something that is only visible to your app, so you will not be able to locate it with any file manager apps.
If you like other apps to access those audio files, be visible in any file manager apps, then use external storage directory.

Detecting the download path in a browser [duplicate]

This question already has answers here:
Get browser download path with javascript
(4 answers)
Closed 2 years ago.
I am using Java Spring as the backend and plain JS on the front-end.
User can download files from one of the pages on my application.
I want to know the path where the file will be downloaded and saved.
Is it possible to do that?
User can download files from one of the pages on my application. I
want to know the path where the file will be downloaded and saved.
Is it possible to do that?
No.
It is not possible to get the file path which user selects to download file to programmatically. It is not a trivial matter to determine if user downloads file at all. Getting the file path of the downloaded file, if user downloads file, should require user action.
It is not clear from Question why path to downloaded file at user filesystem would be useful or necessary for an application.
An exception, which could be considered a bug Full path to file at local filesystem is set as value of textarea element when files are dragged and dropped at element; would be, at some browsers, where the file or folder path is mistakenly, or unknowingly exposed; for example, by dropping file or folder at a <textarea> element. Though that case still would not verify that the same file which was downloaded would be exposed as a file path at user filesystem. User could change the name of the file at any time, both prior to download at Save File dialog, and after file is saved at user filesystem.
Another exception, at chromium, chrome browsers, would be where file or folder is written to LocalFileSystem.
See
Detect when user accepts to download a file
How FileReader.readAsText in HTML5 File API works?
jQuery File Upload Plugin: Is possible to preserve the structure of uploaded folders?

Access Files on Android though HTML file input

I have a app which loads in files and displays them as text. It uses javascript and HTML, the file picker opens but when on a Samsung Galaxy Tab A running 6.0 on a account which is not the "Owner" you are unable to access the local files when using the html file input.
Using the owner account
Using another user account
Is there any way to let a none Owner access locla files though this HTML file picker, I know that if you get athris party file manager it will show up with the onedrive and gallery tabs and you can access the file though that. But I wnat it to work with out having to install another app.

Download to a particular folder from a web application

I have a web application, I have a requirement to download more than 10 files to a folder. By default the download happens to browser download location. The user have a new requirement to have an option to select the folder where there need to save the file from web application. Could you please let me know whether it is possible in all browsers, I know by default chrome starts downloading to download folder. The user will be searching with some condition and all files which match the condition should be downloaded to the folder given by user.
Could you please let me know whether I can override the download location in browser like chrome.

Browse local image folder from an HTML page

I'm writing an esay live blogging app.
I have a form in the backend and I can upload to the server text messages or images.
At this moment everything is working with a simple file upload field, but I want to speed up the process so:
1) reflex camera attached via USB that save images in a local folder on my mac
2) a "preview" of the folder in the backend, updating live while I shoot picture
3) when I select a shot I will upload to the server (this is not difficult).
I cannot find the right plugin to "watch" and interact a local directory. Any idea?

Categories

Resources