This library is created to make files uploading and downloading on Aws easier

Overview

S3Manager - aws files uploading library

This library is created to make files uploading and downloading on Aws easier

Features

  • Easy to use
  • Single/multiple file upload on Aws s3

How to Add

Project level gradle file

   allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

App level gradle file

	dependencies {
	         implementation 'com.github.rkahir21:S3Manager:v1.0'
	}

Deployment

How to use this amazing lib and save your time

    private val s3Manager by lazy {
           S3Manager(this)
       }
    override fun onCreate(savedInstanceState: Bundle?) {
            super.onCreate(savedInstanceState)
            setContentView(R.layout.activity_main)

            //You can also check if credentials set or not
            if (s3Manager.isCredentialsAvailable()) {
                //Now you can used

                //for single file
                uploadFile()

                //for multiple files
                uploadFiles()

            } else {
                //You need to call setCredentials()
                setCredentials()
            }

        }

setCredentials

      private fun setCredentials() {
         s3Manager.setCredentials(
             S3Config(
                 "YOUR_ACCESS_KEY_HERE",
                 "YOUR_SECRET_KEY_HERE",
                 "YOUR_REGION_HERE",
                 "YOUR_BUCKET_HERE",
             )
         )
     }

Upload files

      private fun uploadFile() {
         s3Manager.uploadFile(
             file = File("demo.jpg"), // File need to upload
             filename = "uploadFileName", //if not pass argument then it has by default random name
             directory = "customer/user/profile", // full path of upload directory
             s3SingleTransferListener = object :
                 S3SingleTransferListener { //file uploading status listener

                 override fun onCompleted(fileName: String) {
                     //Do something on file uploading successfully
                 }

                 override fun onError(id: Int, exception: Exception?) {
                     //Do something on got any error file uploading
                 }

                 override fun onProgress(progress: Int) {
                     //Do something on file uploading progress
                 }

             }

         )
     }

     private fun uploadFiles() {
         s3Manager.uploadFiles(
             files = arrayListOf(File("demo.jpg")), // array of file need to upload
             directory = "customer/user/profile", // full path of upload directory
             s3MultipleTransferListener = object :
                 S3MultipleTransferListener { //file uploading status listener

                 override fun onCompleted(listOfName: ArrayList<String>) {
                     //Do something on files uploading successfully
                 }

                 override fun onError(id: Int, exception: Exception?) {
                     //Do something on got any error file uploading
                 }

                 override fun onProgress(progress: Int) {
                     //Do something on file uploading progress
                 }

                 override fun filesUploadedCount(totalFiles: Int, pendingFile: Int) {
                     //Do something on file uploading count
                 }

             }
         )
     }

Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

Please adhere to this project's code of conduct.

Authors

Happy Coding | Made with | Made in 🇮🇳 ... :)

You might also like...
Mock up social media android application created to interact with a backend Java server using GraphQL.

The Community Board Project Authorship: author: dnglokpor date: may 2022 Project Summary: The Community Board Project consists of a Java Spring Boot b

Fully customizable, built from scratch NumberPicker for android. Created as an alternative to non-customizable native android NumberPicker
Fully customizable, built from scratch NumberPicker for android. Created as an alternative to non-customizable native android NumberPicker

GoodNumberPicker GoodPicker is an Android library that provides a picker with customizable UI. It was developed as alternative to the default NumberPi

🧶 Library to handling files for persistent storage with Google Cloud Storage and Amazon S3-compatible server, made in Kotlin

🧶 Remi Library to handling files for persistent storage with Google Cloud Storage and Amazon S3-compatible server, made in Kotlin! Why is this built?

Bukkit library written in Kotlin to make with compatibility and ease non-playable-character (NPC)

mc-npk Easy to use, fast and efficient library to make non-playable-characters (

Tiny library to ease the use of environment variables with support for .env files

asimov/environment Tiny library to ease the use of environment variables with support for .env files. Installation Gradle (Kotlin) repositories {

Kadrekka is a library that aims to make Kotlin more accessible to the northern italian population

Kadrekka Kadrekka is a library that aims to make Kotlin more accessible to the northern italian population. It provides lots of utility functions to m

A tool to model and analyze the design of systems from .class files
A tool to model and analyze the design of systems from .class files

sift A tool to model and analyze the design of systems from java class files. Features CLI tool for building, querying and diff-ing "system models" fr

Learn how to make an app designed for single-screen devices shine when running on foldable and dual-screen devices

dcberlin21-workshop Make your app shine om foldable devices with the samples we have here. Related links SDK open-source code SDK samples (Kotlin) App

A custom view for rating which easy to make and use, but function is excellent
A custom view for rating which easy to make and use, but function is excellent

QRatingView A custom view for rating which easy to make and use, but function is excellent Effect Picture Properties declare-styleable name="QRat

Releases(v1.1)
Owner
Rajesh Khuti
Rajesh Khuti
Spikot is a Kotlin library to make Spigot development easier

Spikot is a Kotlin library to make Spigot development easier Using Spikot Installation To use spikot add the following to your build.gradle.kts file.

Cody 1 Oct 30, 2021
Blog Backend Api built with Kotlin, Springboot and AWS

Kotlin, Spring Boot, MySQL, JPA, Hibernate Rest API for Blogs A Restful CRUD API using Kotlin, Spring Boot, Mysql, JPA and Hibernate hosted on AWS Ela

Nick Ang 1 Nov 15, 2021
Allows you to use AWS KMS asymmetric keys as PGP/GPG keys.

KMS for PGP/GPG This tool allows you to use AWS KMS asymmetric keys as if they were PGP/GPG keys. (Only for signatures for now.) This can be useful if

Stojan Dimitrovski 8 Oct 21, 2022
Android app for streaming and downloading Movies, TV-Series and Anime.

The main app CloudStream-3 DOWNLOAD: https://github.com/LagradOst/CloudStream-3/releases Features: AdFree, No ads whatsoever No tracking/analytics Boo

ArjixWasTaken 4 Aug 5, 2022
BindsAdapter is an Android library to help you create and maintain Adapter class easier via ksp( Kotlin Symbol Processing).

BindsAdapter BindsAdapter is an Android library to help you create and maintain Adapter class easier via ksp( Kotlin Symbol Processing). Installation

Jintin 5 Jul 30, 2022
A project that takes advantage of docker and makes the load test easier

Performance Test It's a project that takes advantage of docker and makes the load test easier. Also, it collects metrics from each running container.

jorge cabrera 1 Dec 9, 2021
Distance Sensor Localization Library created by FTC 16439, AlphaGo

AGDistanceLocalization A simple and easy-to-use library, written in Kotlin, to aid in the process of localizing your robot using Distance Sensors! Thi

AlphaGo 3 Nov 3, 2022
Binding your extras more easier, more simpler for your Android project

Ktan Ktan make your intent / arguments more easier and readable. And most important, will help you bind all extras for your activity / fragment. And a

Ade Fruandta 3 Jan 7, 2023
Created a Dice Rolling App in Kotlin & JavaFX

Dice Rolling App in Kotlin Created a Dice Rolling App in Kotlin & JavaFX This is my attempt at making a Dice Roller in Kotlin using JavaFX. Hope you e

Sharan Thakur 0 Nov 4, 2021
Project created in order to handle account management

Account Service App Aplicação responsável em receber dados de uma conta, validá-los e retornar mensagem de sucesso ou erro. Tecnologias utilizadas - L

Rafael Alberto 0 Dec 14, 2021