Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
cordova-plugin-saf-mediastore
Advanced tools
Cordova Plugin to read and save files using the Storage Access Framework and Mediastore on Android only.
This plugin allows you to read and save files using the Storage Access Framework and Mediastore on Android only.
selectFolder(uri:string):Promise<string>
Launches an Intent to select a folder to which files can be saved. Returns the content URI.
selectFile(uri:string):Promise<string>
Launches an Intent to select a file. Returns the content URI.
openFolder(uri:string):Promise<void>
Launches an Intent to open a folder in the folder picker.
openFile(uri:string):Promise<void>
Launches an Intent to open a file.
readFile(uri:string):Promise<ArrayBuffer>
Reads a file as an ArrayBuffer.
writeFile(params:{
data:string,
filename:string,
folder?:string,
subFolder?:string
}):Promise<string>
Writes a file to a specific filename, with the folder and subfolder being optional. The subfolder will be created if it does not exist, and the default folder is the Downloads folder (saved via Mediastore). Returns the content URI. data
is a Base 64 string.
overwriteFile(params:{
uri:string,
data:string
}):Promise<string>
Overwrites a file at a specific content URI. Returns the content URI.
saveFile(params:{
data:string,
filename?:string,
folder?:string
}):Promise<string>
Launches a file picker Intent to save a file, with the preferred filename and folder being optional. Returns the content URI. data
is a Base 64 string.
deleteFile(uri:string):Promise<number>
Deletes a file at a specific content URI. Returns the number of files deleted.
getFileName(uri:string):Promise<string>
Returns the filename of the corresponding content URI.
getUri(params:{
folder:string,
subFolder?:string,
filename?:string,
}):Promise<string>
Returns the content URI of the file in the corresponding folder and subfolder.
To call methods:
cordova.plugins.safMediastore.<function>(params); //returns a Promise
await cordova.plugins.safMediastore.<function>(params); //in an async function
FAQs
Cordova Plugin to read and save files using the Storage Access Framework and Mediastore on Android only.
The npm package cordova-plugin-saf-mediastore receives a total of 206 weekly downloads. As such, cordova-plugin-saf-mediastore popularity was classified as not popular.
We found that cordova-plugin-saf-mediastore demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.