All Projects → whera → Simpleupload

whera / Simpleupload

Licence: mit
Simple upload system in PHP, compatible with AWS S3, Dropbox, Azure and others.

Projects that are alternatives of or similar to Simpleupload

Vs Deploy
Visual Studio Code extension that provides commands to deploy files of a workspace to a destination.
Stars: ✭ 123 (+44.71%)
Mutual labels:  aws, azure, dropbox
Vscode Deploy Reloaded
Recoded version of Visual Studio Code extension 'vs-deploy', which provides commands to deploy files to one or more destinations.
Stars: ✭ 129 (+51.76%)
Mutual labels:  aws, azure, dropbox
Storage
💿 Storage abstractions with implementations for .NET/.NET Standard
Stars: ✭ 380 (+347.06%)
Mutual labels:  aws, azure, aws-s3
Pulumi
Pulumi - Developer-First Infrastructure as Code. Your Cloud, Your Language, Your Way 🚀
Stars: ✭ 10,887 (+12708.24%)
Mutual labels:  aws, azure
Manageiq
ManageIQ Open-Source Management Platform
Stars: ✭ 1,089 (+1181.18%)
Mutual labels:  aws, azure
Aws S3
Amazon S3 volume type for Craft CMS
Stars: ✭ 57 (-32.94%)
Mutual labels:  aws, aws-s3
Amplify Js
A declarative JavaScript library for application development using cloud services.
Stars: ✭ 8,539 (+9945.88%)
Mutual labels:  aws, aws-s3
Aws Config To Elasticsearch
Generates an AWS Config Snapshot and ingests it into ElasticSearch for further analysis using Kibana
Stars: ✭ 62 (-27.06%)
Mutual labels:  aws, aws-s3
Cloud Portal
Self service web portal for different Cloud platforms like Azure, AWS and VMWare vSphere.
Stars: ✭ 60 (-29.41%)
Mutual labels:  aws, azure
Curso Aws Com Terraform
🎦 🇧🇷 Arquivos do curso "DevOps: AWS com Terraform Automatizando sua infraestrutura" publicado na Udemy. Você pode me ajudar comprando o curso utilizando o link abaixo.
Stars: ✭ 62 (-27.06%)
Mutual labels:  aws, aws-s3
Aws Github Actions
Deploy 🚀 to AWS ☁️ with GitHub Actions!
Stars: ✭ 70 (-17.65%)
Mutual labels:  aws, aws-s3
Examples
Infrastructure, containers, and serverless apps to AWS, Azure, GCP, and Kubernetes... all deployed with Pulumi
Stars: ✭ 1,085 (+1176.47%)
Mutual labels:  aws, azure
Simples3
Simple no frills AWS S3 Golang Library using REST with V4 Signing (without AWS Go SDK)
Stars: ✭ 51 (-40%)
Mutual labels:  aws, aws-s3
Pega Helm Charts
Orchestrate a Pega Platform™ deployment by using Docker, Kubernetes, and Helm to take advantage of Pega Platform Cloud Choice flexibility.
Stars: ✭ 58 (-31.76%)
Mutual labels:  aws, azure
Kubernetes Guides
Crosswalk Playbooks and Code for Teams to Manage Kubernetes in Production
Stars: ✭ 51 (-40%)
Mutual labels:  aws, azure
Ha Sap Terraform Deployments
Automated SAP/HA Deployments in Public/Private Clouds
Stars: ✭ 61 (-28.24%)
Mutual labels:  aws, azure
Terraform Security Scan
Run a security scan on your terraform with the very nice https://github.com/liamg/tfsec
Stars: ✭ 64 (-24.71%)
Mutual labels:  aws, azure
Terrastack
This project is archived, but the idea of Terrastack lives on in the Terraform CDK. - https://github.com/hashicorp/terraform-cdk
Stars: ✭ 71 (-16.47%)
Mutual labels:  aws, azure
Pragmaticai
[Book-2019] Pragmatic AI: An Introduction to Cloud-based Machine Learning
Stars: ✭ 79 (-7.06%)
Mutual labels:  aws, azure
Meteor Files
🚀 Upload files via DDP or HTTP to ☄️ Meteor server FS, AWS, GridFS, DropBox or Google Drive. Fast, secure and robust.
Stars: ✭ 1,033 (+1115.29%)
Mutual labels:  aws-s3, dropbox

SimpleUpload

Simple upload system in PHP, compatible with AWS S3, Dropbox, Azure and others.

Travis Code Coverage Scrutinizer Code Quality Github All Releases Packagist license

Component responsible for simplifying file upload. With it it is possible to perform local uploads and services such as: Dropbox, AWS S3, Azure, SFTP among others. Check out the full list here.

Installation

Via Composer:

composer require wsw/simple-upload

Usage

Basic use:

<?php

use League\Flysystem\Adapter\Local;
use WSW\SimpleUpload\Services\SimpleUpload;

try {
    $adapter = new Local('/home/files');
    $file    = SimpleUpload::create($_FILES['file'], $adapter)->send();
   
} catch (\Exception $e) {
    echo $e->getMessage();
}

Advanced use:

<?php

use League\Flysystem\Adapter\Local;
use WSW\SimpleUpload\Services\SimpleUpload;

try {
    $adapter = new Local('/home/files');
    $upload  = SimpleUpload::create($_FILES['file'], $adapter);
    
    // Optional Methods
    
    //Create a new directory from the root directory defined on the adapter.
    $upload->setPath('newDir'); // Ex:/home/files/newDir/
    
    // Define a new file name
    $upload->setName('newName'); // Ex: newName.csv
    
    // Defines which file extensions the upload will allow
    $upload->setAllowedExtensions(['csv', 'txt']);
    
    $file = $upload->send();

} catch (\Exception $e) {
    echo $e->getMessage();
}

Result

<?php
// Returns the size of the file in KB
echo $file->getSize(); // 94762

// Returns the file type
echo $file->getMimetype(); // text/plain

// Returns instance of DateTime for date and time of creation
echo $file->getTimestamp(); // \DateTime

// Absolute file path
echo $file->getPath(); // /home/files/file.txt

// Directory where the file is located
echo $file->getFilePath(); // /home/files/

// Filename with extension
echo $file->getFileName(); // file.txt

// Filename without extension
echo $file->getName(); // file

// File extension
echo $file->getExtension(); // txt

Testing

$ composer test

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].