Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@alliance-software-development/asd-media-react-native
Advanced tools
Readme
React Native Module for ASD Media built on top of UploadCare API
npm install @alliance-software-development/asd-media-react-native
OR
yarn add @alliance-software-development/asd-media-react-native
import React from 'react';
import { View, Image, Button, StyleSheet } from 'react-native';
import { ASDMedia } from '@alliance-software-development/asd-media-react-native';
// ...
const App = () => {
const asdMediaRef = React.useRef()
const [selectedImage, setSelectedImage] = React.useState()
const handleOnImageUpload = (data) => {
alert(JSON.stringify(data));
};
const handleOnImageChange = (data) => {
setSelectedImage(data.uri)
};
return (
<View style={styles.container}>
<View style={{ margin: 10 }}>
<ASDMedia
ref={asdMediaRef}
publicKey="UPLOADCARE_PUBLIC_KEY"
onImageUpload={handleOnImageUpload}
onImageChange={handleOnImageChange}
/>
</View>
<Image source={{uri: selectedImage }} style={{width: 100, height: 100}}>
<Button title="Upload" onPress={asdMediaRef.current?.handleUpload} />
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: "row",
justifyContent: "center",
alignItems: "center"
}
})
ASDMedia component accepts following props.
Name | Type | Default | Is Required |
---|---|---|---|
publicKey | string | - | Yes |
onImageUpload | Func | - | Yes |
onImageChange | Func | - | No |
buttonText | string | Choose a photo | No |
buttonContainerStyle | {} | - | No |
buttonStyle | {} | - | No |
buttonTextStyle | {} | - | No |
publicKey
(String) - UploadCare public key of your project Doc here.onImageUpload
(?=Function) - Called upon success or failure of the upload session with { ...props }
onImageChange
(?=Function) - Called when the image selection changes with { uri:
imagepath }
buttonText
(?String) - Button text, default is Choose a photo
.buttonContainerStyle
(?Object) - Styling to be spread to the view wrapping the button Component.buttonStyle
(?Object) - Styling to be spread to the default button component style.buttonTextStyle
(?Object) - Button text stylingFAQs
React Native Module for ASD Media built on top UploadCare API
The npm package @alliance-software-development/asd-media-react-native receives a total of 1 weekly downloads. As such, @alliance-software-development/asd-media-react-native popularity was classified as not popular.
We found that @alliance-software-development/asd-media-react-native demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.