Download the PHP package saro0h/media-api-bundle without Composer

On this page you can find all versions of the php package saro0h/media-api-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package media-api-bundle

Saro0h\MediaApiBundle

SensioLabsInsight

This bundle allows you to have an upload of files through an API.

Installation

Step 1: Install MediaApiBundle using Composer

Add MediaApiBundle in your composer.json:

{
    "require": {
        "saro0h/media-api-bundle": "~1.0"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update saro0h/media-api-bundle

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php

// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Saro0h\MediaApiBundle\MediaApiBundle(),
        // ...
    );
}

Step 3: Import the routes of the bundle

Add the following lines to the app/config/routing.yml:

media_api_bundle:
    resource: "@MediaApiBundle/Resources/config/routing.yml"

Step 4: Create the database and the schema

Run the following commands (after configuring the ORM parameters)

app/console doctrine:database:create
app/console doctrine:schema:create

Step 4 (optional): Configure your config.yml file

# app/config/config.yml
media_api:
    media_path: %media_path%    # Path to the folder where the media will be uploaded (by default it's `web/uploads` folder of your project)
    field_name: %filename%      # Name of the field used to supply the file in the form (by default it's "media")

Usage

Upload a file

If you did not configure the bundle, you just have to POST on the url /media/api/upload the field mediawith the file as showed below: upload

If you can also choose the name of the file uploaded by supplying the field filename: upload_with_filename

Get a media

get_media

Delete a media

delete_media

License

This bundle is licensed under the MIT license.


All versions of media-api-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
sensio/framework-extra-bundle Version ~3.0
doctrine/orm Version ~2.2,>=2.2.3
doctrine/doctrine-bundle Version ~1.2
symfony/monolog-bundle Version ~2.4
jms/serializer-bundle Version ~1.0
willdurand/hateoas-bundle Version 1.0.*@dev
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package saro0h/media-api-bundle contains the following files

Loading the files please wait ....