This is, perhaps, a rehash of an older SO question "A html5 web app for mobile safari to upload images from the Photos.app?". I realize that iOS Safari simply does not permit file uploads. However, I was wondering if there are ways to leverage cloud storage API's such as Dropbox or iCloud so as to accomplish the same goal. So, for example, instead of a file upload dialog I would have a url that links to dropbox/icloud that could then prompt the user for the file to send.
Sorry if I'm being too vague - but I suppose I don't care too much about the mechanism of delivery.
If you mean the url belongs to a dropbox/icloud file then you don't even need to "select" any file since the url points to one already, so a simple textbox in a form should suffice.
If this is not what you mean, can you elaborate?
Related
I need to pre-authorize a URL to use microphone. It's an internal system accessed via Electron (v4.1.3).
Pre-authorization is required as users use it in some sort of Linux thin client. That is, each day the system bootstrap from an image and then profiles,etc are created. Therefore users would have to click Yes on the access prompt every single day, and if hitting NO just causing headaches to provide them steps to fix as the system requires mic/audio.
I've checked Google Chrome, and apparently it writes the permission on {chrome_profile_dir}\Default\Preferences file.
But on Electron, could not see same behavior on AppData\Roaming\{app.name}\Preferences file. So, to be honest I don't even know where Electron is storing the permission. I deleted the aforementioned folder, but it doesn't ask permission anymore.
Is there a way, like writing to a preference file, I could pre-authorize this? If yes, would write that to the image file.
You could use permission request handlers in electron.
https://electronjs.org/docs/api/session#sessetpermissionrequesthandlerhandler
I want to send an HTML email with link in them. The link should open files from a windows shared drive. The users will already be logged in to the network via VPN.
I've tried
Test Report
This works fine when opening on a PC but I can't figure how to open this in an iPhone although the users accessing the network thru a VPN client on their phone.
I'm open to use any third party solution
This link is for IPADs, but it should work with Iphone as well:
https://discussions.apple.com/thread/3978480?tstart=0
According to Apple's forum, you need to use some sort of third party software to access files, like filebrowser (link in the forum page). Personally, I use filebrowser and it works fine for me. It works kind of like WinSCP for windows. It pulls data from a Server (your vpn) and allows you to download and modify on your phone. It is cross platform compatible, so it is great if you have multiple devices. I have heard that FileExplorer Pro is exceptional, but I have not tried it. Here is the link to fileexplorer on the app store:
https://itunes.apple.com/us/app/fileexplorer-pro/id499470113?mt=8
EDIT:
As far as I know, this is not possible from any mobile device. Best bet is to send the file through a secure email, such as ProtonMail.
iOS is less flexible when it comes to file management and file associations, so there’s less you can do with these files. However, you can still open a video file directly from your shared folder and play it on your device or access other media files in a similar way. You could also use the “Open In” feature to open a file in a specific app.
The Windows network file sharing protocol is known as CIFS, which is an implementation of the SMB protocol.
this guide may help you. this is not exact answer about what you want though. https://www.guidingtech.com/27119/access-shared-windows-iphone-ios-wifi/
My chrome app needs to save a file with human-readable or standard format such as SQLite (It should be readable outside Chrome).
Is there any API suitable for this purpose?
Some files with .localstorage extension (SQLite format) are in Chrome\User Data\Default\Local Storage folder. Is it possible to create such files by the app?
Edited: The app should not ask user for extra permission.
Thanks for your consideration.
chrome.fileSystem API is what you need.
You will need to ask the user at least once where to save the file, but then you can retain the entry to write again to the same file/folder.
There is no way around asking the user to "escape the sandbox".
You'll want to use the Quota Management API. This is per-origin storage, and you request specific amounts of quota.
It sounds like you also want your users to open the files directly? There's an HTML5 filesystem explorer Chrome app that you can use. It'll show you the files, and you can figure things out from their URLs (e.g. I'm currently using filesystem:http://localhost:8000/temporary/bar for a local experiment).
Or are you looking for something more user friendly? I think you have to use file save in that case, the same way Google Drive does.
HTML uses form to send data to web server. The data can be included in the url parameters or embedded in HTML Request body. But for a file, I don't know how it works. I want to know this because I see some difference between uploading file on web and desktop applications.
The desktop application usually provides a text box to allow the user input the locale path of the file. But for web applications, the text box is usually read only.It displays the file path when the file gets selected with the browse button. Is that just a design issue between desktop and web?
Question is a bit unclear, but one important aspect about web applications (or HTML forms) is that they are sandboxed and cannot access local files directly. So the file upload picker does not allow direct input of the file name (which might be scripted), but only selection through an OS (or browser) supplied file choose UI (that the app or page cannot mess with).
Once the user has selected the file the page can access it, but it cannot make the selection itself (or surreptitiously).
A recent trend is to lock down desktop apps in the same manner. See for example Apple's sandboxing restrictions, that also do not allow apps to open random files without user intervention.
Is that just a design issue between desktop and web?
The implementation of a file upload form, whether desktop or web, is largely unimportant to the end result. Both desktop and web controls can utilize either a path string or a full-blown file navigator, though a desktop app is more likely to vary in its implementation. The only other difference is the destination: desktop apps tend to parse the file in memory and render it somehow, while web apps almost invariably upload it to a server (though this is subject to change: see the HTML5 file API), which then further operates on it.
I think I read once that google chrome was working on some kind of API for mapping file extensions to web sites, so that you could for example have a .docx map to a url like http://word.com?OpenFile=%1 Opening the file from your OS would fire up the browser and take you to the appropriate site and give the site access to the file.
Is this true or am I just going crazy? If so, where can I find the spec for that system?
Ha! Found it at http://googlecode.blogspot.com/2011/06/working-with-chromes-file-browser.html and http://code.google.com/chrome/extensions/fileBrowserHandler.html
Take that, close voters!