2017 © Pedro Peláez
 

project simple-file-server

Simple file server with file upload using API.

image

damianz5/simple-file-server

Simple file server with file upload using API.

  • Monday, May 8, 2017
  • by damianz5
  • Repository
  • 0 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Simple file server

Build status on Linux, (*1)

Scrutinizer Code Quality, (*2)

Code Coverage, (*3)

StyleCi.io, (*4)

Latest Stable Version, (*5)

SensioLabsInsight, (*6)

Installation

composer create-project damianz5/simple-file-server

Test run

symfony server:start --port 8083 --no-tls

simple vanilla php client:, (*7)

php example/simpleClient.php

should return (container name will be different), (*8)

response: {"status":"ok","collection_name":"5985f402600fd3d864de043a44f31b5f","files":["data\/container-5985f402600fd3d864de043a44f31b5f\/9cf3a175-test1.png"]}

Buzz Client (requires kriswallsmith/buzz): in progress, (*9)


add new files to new collection:, (*10)

curl -H 'AUTHKEY:supersecretcode1@' \
-F "image=@screenshot.png" -F "xx=@content.html" \
http://127.0.0.1:8083/api/upload

add new files to existing collection:, (*11)

curl -H 'AUTHKEY:supersecretcode1@' \
-F "image=@screenshot.png" -F "xx=@content.html" \
http://127.0.0.1:8083/api/upload/ddf59d090e70094429414935c5ea53a1

list files:, (*12)

curl -H 'AUTHKEY:supersecretcode1@' \
http://127.0.0.1:8083/api/list/ddf59d090e70094429414935c5ea53a1

using https://httpie.org/, (*13)

http GET http://127.0.0.1:8083/api/list/beefbeefbeefbeefbeefbeefbeefbeef AUTHKEY:supersecretcode1@

IMPORTANT

  • change credentials keys in app/config/parameters.yml
  • check upload_max_filesize and post_max_size in your php.ini

TODO

  • add more tests
  • invalid uploaded files should return more information

The Versions

08/05 2017

dev-master

9999999-dev

Simple file server with file upload using API.

  Sources   Download

MIT

The Requires

 

The Development Requires

08/05 2017