How to use the react-native-image-crop-picker.clean function in react-native-image-crop-picker

To help you get started, we’ve selected a few react-native-image-crop-picker examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hummingbird-me / kitsu-mobile / src / screens / Feed / components / PostCreator / component.js View on Github external
componentWillUnmount() {
    // Abort any uploading if user cancels
    if (this.uploader) {
      this.uploader.abort();
    }
    BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress);
    ImagePicker.clean();
    Keyboard.dismiss();
  }
github hummingbird-me / kitsu-mobile / src / screens / Feed / components / PostCreator / component.js View on Github external
id: currentUserId,
          },
          ...postUploads,
          ...targetData,
          ...mediaData,
          nsfw,
          spoiler,
          ...spoiledData,
          embedUrl,
        }, {
          include: 'media,spoiledUnit,user,uploads',
        });
      }

      // Clean up any tmp image files
      ImagePicker.clean();

      if (onPostCreated) {
        onPostCreated(newPost);
      }
    } catch (err) {
      const string = (err && err[0].detail) || 'Failed to create post.';
      this.setState({ error: string });
    }

    this.setState({ busy: false });
  }
github berty / berty / js / packages / components / chat / common.tsx View on Github external
? PERMISSIONS.IOS.CAMERA
														: PERMISSIONS.ANDROID.CAMERA,
												)
												if (status !== RESULTS.GRANTED) {
													setSecurityAccessVisibility(true)
													return
												}
											} catch (err) {
												console.log(err)
											}
										}
									} catch (err) {
										console.log(err)
									}
									try {
										await ImagePicker.clean()
									} catch (err) {}
									try {
										const image = await ImagePicker.openCamera({
											cropping: false,
										})

										prepareMediaAndSend([
											{
												filename: '',
												uri: image.path || image.sourceURL || '',
												mimeType: image.mime,
											},
										])
									} catch (err) {
										console.log(err)
									}
github berty / berty / js / packages / components / chat / file-uploads / AddFileMenu.tsx View on Github external
const status = await request(
								Platform.OS === 'ios' ? PERMISSIONS.IOS.CAMERA : PERMISSIONS.ANDROID.CAMERA,
							)
							if (status !== RESULTS.GRANTED) {
								setSecurityAccessVisibility(true)
								return
							}
						} catch (err) {
							console.log(err)
						}
					}
				} catch (err) {
					console.log(err)
				}
				try {
					await ImagePicker.clean()
				} catch (err) {}
				try {
					const image = await ImagePicker.openCamera({
						cropping: false,
					})

					prepareMediaAndSend([
						{
							filename: '',
							uri: image.path || image.sourceURL || '',
							mimeType: image.mime,
						},
					])
				} catch (err) {
					console.log(err)
				}
github raindropio / mobile / src / screens / bookmark / add / home / image.js View on Github external
onPress = async ()=>{
        try{
            await ImagePicker.clean()
        }catch(e){}

        let images = []
        try{
            images = await ImagePicker.openPicker({
                mediaType: 'photo',
                multiple: true,
                maxFiles: 9999,
                cropping: true,
                smartAlbums: ['PhotoStream', 'Generic', 'UserLibrary', 'Screenshots'],
                compressImageQuality: .9,
                compressImageMaxWidth: 3000,
                compressImageMaxHeight: 10000,
                loadingLabelText: t.s('loading'),
                forceJpg: true, //only ios
                cropperToolbarTitle: t.s('edit') + ' ' + t.s('imaged'),