पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.3.2

simple_s3

एएस एस 3 के लिए एक उन्नत लेकिन आसान उपयोग करने वाला प्लगइन जो एंड्रॉइड और आईओएस में किसी भी फ़ाइल को अपलोड और हटाने के लिए उपयोग किया जा सकता है।

AndroidiOS
30-दिन डाउनलोड
108
लाइक
41
Pub अंक
140

पैकेज इंस्टॉल करें

flutter pub add simple_s3

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

simple_s3 एक फ्लटर प्लगइन है जो एंड्रॉइड और आईओएस पर एवीएस एस3 पर फ़ाइल अपलोड और हटाने को सरल बनाता है। उपयोग में आसानी के साथ डिज़ाइन किया गया, इसमें जटिल एवीएस एसडीके इंटरैक्शन को सरल विधियों में अभिव्यक्त किया गया है, जिससे डेवलपर्स को गहन एवीएस ज्ञान के बिना फ़ाइल स्टोरेज का प्रबंधन करने में सक्षम होते हैं। यह पैकेज किसी भी फ़ाइल प्रकार का समर्थन करता है और क्लाउड-आधारित फ़ाइल हैंडलिंग की आवश्यकता वाले मोबाइल ऐप्स में बिना किसी दिक्कत के एकीकृत हो सकता है। यह एवीएस के सुरक्षित प्रमाणीकरण तंत्र का उपयोग करता है और एक हल्के, डेवलपर-अनुकूल एपीआई के साथ बनाए रखता है।

उपयोग

  • AWS S3 में छवियों और दस्तावेजों को अपलोड करना
  • S3 बैकेट से फ़ाइलों को हटाना
  • मोबाइल ऐप्स में क्लाउड स्टोरेज को एकीकृत करना
  • उपयोगकर्ता-जनित सामग्री भंडारण का प्रबंधन
  • बैकअप और सिंक विशेषताओं को सक्षम करना

मुख्य विशेषताएँ

  • सरल अपलोड और हटाने के API
  • सभी फ़ाइल प्रकारों के लिए समर्थन
  • सुरक्षित AWS S3 एकीकरण
  • क्रॉस-प्लेटफॉर्म संगतता (Android और iOS)
  • न्यूनतम सेटअप और कॉन्फ़िगरेशन

इनके लिए उपयुक्त

  • AWS S3 का उपयोग करने वाले मोबाइल ऐप विकासकर्ता
  • फ़ाइल अपलोड/हटाने की क्षमता की आवश्यकता वाले प्रोजेक्ट्स
  • सुरक्षित क्लाउड फ़ाइल प्रबंधन की आवश्यकता वाले ऐप्स
  • हल्का S3 समाधान चाहने वाले विकासकर्ता

विचार योग्य बातें

  • AWS प्रमाणपत्र और सही बैकेट नीतियों की आवश्यकता होती है
  • Android और iOS प्लेटफॉर्म तक सीमित
  • बाहरी AWS SDK व्यवहार पर निर्भर करता है
  • कोई निर्मित फ़ाइल सूची या मेटाडेटा प्रबंधन नहीं

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

simple_s3

An advance yet simple to use AWS S3 plugin for upload and deletion.

Simple S3 uses AWS Native SDKs for iOS and Android

Getting started

Add dependency in pubspec.yaml

simple_s3: 0.3.2

Follow @ab_hi_j on Twitter

Features

Feature Description
Null Safe :white_check_mark:
Upload Percentage :white_check_mark:
Supports all files SimpleS3 auto detects content type of file by looking into extension
Set Access Type Allows you to set access type of file ex. PublicRead, Private etc
Default is Public Read
Timestamp Turned off by default if turned on allows you to append timestamp in file name.
Location of timestamp can be changed to either prefix or suffix
Default is prefix
Custom File Name Allows to change name of file about to upload.
Note : File name must contain extension.
Custom S3 folder path Allows to upload file to specific folder in S3
Sub Region Support Allows upload/delete operations on S3 having sub regions
Delete Object Allows deletion of file object
Auto Generates URL URL pointing to S3 file is auto generated.


Not working in Android Release mode ?

If your Android app is not working in release mode please check this section


Usage Examples

Simple File Upload

// returns url pointing to S3 file

SimpleS3 _simpleS3 = SimpleS3();
String result = await _simpleS3.uploadFile(
				file, <--------------- Selected File
				bucketName, <--------- Your Bucket Name
				poolID, <------------- Your POOL ID
				AWSRegions.apSouth1 <- S3 server region
				);

Delete

// returns bool

bool result = await SimpleS3.delete(
				filePath, <---------------- S3 File Path
				bucketName, <-------------- Your Bucket Name
				poolID, <------------------ Your POOL ID
				AWSRegions.apSouth1, <----- S3 server region
				);

// delete also supports sub-regions

File Upload with Percentage

// returns url pointing to S3 file

SimpleS3 _simpleS3 = SimpleS3();
//Upload function
String result = await _simpleS3.uploadFile(
				file, <--------------- Selected File
				bucketName, <--------- Your Bucket Name
				poolID, <------------- Your POOL ID
				AWSRegions.apSouth1 <- S3 server region
				);

//Widget
child: StreamBuilder<dynamic>(  
    stream: _simpleS3.getUploadPercentage,  
    builder: (context, snapshot) {  
      return new Text(  
        snapshot.data != null ? "Uploaded: ${snapshot.data}" : "Simple S3",  
    );  
  }),

Custom File Name

// returns url pointing to S3 file

SimpleS3 _simpleS3 = SimpleS3();
String result = await _simpleS3.uploadFile(
				file, <------------------------------ Selected File
				bucketName, <------------------------ Your Bucket Name
				poolID, <---------------------------- Your POOL ID
				AWSRegions.apSouth1, <--------------- S3 server region
				fileName: "Dennis_ritchie.jpeg", <--- Custom file name
				);

Custom S3 Path

// returns url pointing to S3 file

SimpleS3 _simpleS3 = SimpleS3();
String result = await _simpleS3.uploadFile(
				file, <-------------------------------- Selected File
				bucketName, <--------------------------- Your Bucket Name
				poolID, <------------------------------- Your POOL ID
				AWSRegions.apSouth1, <------------------ S3 server region
				s3FolderPath: "users/profile_pics", <--- Custom S3 path
				);

// final path will be  "bucketName/users/profile_pics"

Setting Access Control

// returns url pointing to S3 file

SimpleS3 _simpleS3 = SimpleS3();
String result = await _simpleS3.uploadFile(
				file, <------------------------------------- Selected File
				bucketName, <------------------------------- Your Bucket Name
				poolID, <----------------------------------- Your POOL ID
				AWSRegions.apSouth1, <---------------------- S3 server region
				accessControl: S3AccessControl.private, <--- Setting access of uploaded file **private**
				);

// S3AccessControl have more types of AccessControl ex. .publicRead, .publicReadWrite etc...

Using Timestamp

// returns url pointing to S3 file

SimpleS3 _simpleS3 = SimpleS3();
String result = await _simpleS3.uploadFile(
				file, <------------------------------------- Selected File
				bucketName, <------------------------------- Your Bucket Name
				poolID, <----------------------------------- Your POOL ID
				AWSRegions.apSouth1, <---------------------- S3 server region
				useTimeStamp: true, <----------------------- Enable Timestamp
				);

// default location of timestamp is prefix
// if original file name = "Dennis_ritchie.jpeg"
// then the result will be = "1591705658_Dennis_ritchie.jpeg"


// Change Timestamp Location



SimpleS3 _simpleS3 = SimpleS3();
String result = await _simpleS3.uploadFile(
				file, <--------------------------------------- Selected File
				bucketName, <--------------------------------- Your Bucket Name
				poolID, <------------------------------------- Your POOL ID
				AWSRegions.apSouth1, <------------------------ S3 server region
				useTimeStamp: true, <------------------------- Enable Timestamp
				timeStampLocation: TimestampLocation.suffix,<- Changes timestamp location to suffix
				);
// if original file name = "Dennis_ritchie.jpeg"
// then the result will be = "Dennis_ritchie_1591705658.jpeg"

Using Sub-Region

// returns url pointing to S3 file

SimpleS3 _simpleS3 = SimpleS3();
String result = await _simpleS3.uploadFile(
				file, <------------------------------------- Selected File
				bucketName, <------------------------------- Your Bucket Name
				poolID, <----------------------------------- Your POOL ID
				AWSRegions.apSouth1, <---------------------- S3 server region
				subRegion: AWSRegions.apNorthEast1 <-------- Sub region
				);

Debug mode

// for security reasons plugin uses less logs, to enable full logs -

SimpleS3 _simpleS3 = SimpleS3();
String result = await _simpleS3.uploadFile(
				file, <--------------- Selected File
				bucketName, <--------- Your Bucket Name
				poolID, <------------- Your POOL ID
				AWSRegions.apSouth1 <- S3 server region
				debugLog: true, <----- Enable full logs
				);

Android Proguard settings for release mode


// add these lines in your app/build.gradle

		minifyEnabled true  
		useProguard true  
		proguardFiles getDefaultProguardFile('proguard-android.txt'),  
		        'proguard-aws-2.1.5.pro'

//EXAMPLE
		buildTypes {  
		  release {  
		  signingConfig signingConfigs.release  
		  minifyEnabled true  
		  useProguard true  
		  proguardFiles getDefaultProguardFile('proguard-android.txt'),  
		                'proguard-aws-2.1.5.pro'  
		  }  
		}

Now copy contents of this file proguard-aws-2.1.5.pro Create a new file with name "proguard-aws-2.1.5.pro" at the same location as app/build.gradle and paste the copied contents into this file.

Your release mode APK should work now.

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 1 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।