Download the PHP package tiloweb/uploaded-file-type-bundle without Composer

On this page you can find all versions of the php package tiloweb/uploaded-file-type-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 uploaded-file-type-bundle

UploadedFileType Bundle

Don't handle the upload, storage, and access logic of your entities images ! Just point where you want to upload the file, and only store the URL of it.

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Applications that use Symfony Flex

Open a command console, enter your project directory and execute:

Applications that don't use Symfony Flex

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

Configuration

Step 1 : Configure your filesystem

Use the OneUp FlySystem bundle to configure the filesystem you want to work with.

Step 2 : create a default configuration

You can create many configurations, here, you will use the default configuration :

Usage

Simple as 🦆 !

Juste create a Form with a FileType field, with the option upload :

When the form will be submited, the file will be uploaded by the filesystem of the default configuration, the URL of the file will be constructed and stored in your $image field.

You are able to change the naming strategy of your file once stored on your filesystem. To do so, you can add a filename option to your FileType pointing to an enclosure taking 2 parameters :

  1. UploadedFile $file will contain the file uploaded by through form
  2. UploadedFile $item will contain the data object of your form.

By default, the naming strategy is :

Example

Here, you will create a form in order to create a Retail entity with a logo that you want to store on the server.

If you submit the form after having selected on your computer the image logo.png, the file will be stored in public/upload/retail/logo.ee2a6cd0ed54b0f9e625698ae909d7ff.png and the Retail::$logo will store the URL https://www.example.com/upload/retail/logo.ee2a6cd0ed54b0f9e625698ae909d7ff.png.

Reporting an issue or a feature request

Issues and feature requests are tracked in the Github issue tracker.

When reporting a bug, it may be a good idea to reproduce it in a basic project built using the symfony/website-skeleton to allow developers of the bundle to reproduce the issue by simply cloning it and following some steps.


All versions of uploaded-file-type-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4||^8.1.0
oneup/flysystem-bundle Version ^4.0||^3.0
symfony/framework-bundle Version ^5.2||^6.0
symfony/twig-bundle Version ^5.2||^6.0
symfony/yaml Version ^5.2||^6.0
symfony/form Version ^5.2||^6.0
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 tiloweb/uploaded-file-type-bundle contains the following files

Loading the files please wait ....