#62

Product support

Get help in the plugin support forum.

Categories

  • Developer Tools
  • Miscellaneous
  • Utility

Collection of File Upload components for October. This is a port of the back-end fileupload form widget and modified version of Responsiv uploader. There are two primary components provided by this plugin: image uploader and file uploader. The image upload is suitable for uploading photos with thumbnails, whereas the file uploader is suitable for any type of file.

Each component will detect if the relationship is a multiple ("many") or singular ("one") type and render a different control accordingly.

Like this plugin?

If you like this plugin, give this plugin a God review, Like or Make donation with PayPal.

Attaching the uploader (from page)

To attach the uploader directly to the page as a component, you simply initialize the component either on the page or layout:

[fileUploader]
maxSize = "2"
fileTypes = "*"

Attaching the uploader (from component)

The most effective way to use this plugin is to attach the uploader from another component. Override the init method to initialize the uploader inside your component class with the addComponent method.

class MyComponent extends ComponentBase
{
    public function init()
    {
        $component = $this->addComponent(
            'Responsiv\Uploader\Components\FileUploader',
            'fileUploader',
            ['deferredBinding' => false]
        );

        $component->bindModel('files', Project::find(1));
    }
}

The component can then be rendered on the page as normal:

<form>
    <!-- File uploader -->
    {% component 'fileUploader' %}
</form>

As a side note, if you wish to refresh the component via an AJAX handler, ensure that you call the pageCycle method to initialize the page components.

public function onRefreshFiles()
{
    $this->pageCycle();
}

Uploader with deferred binding

You may wish to upload a file and attach it to a model that doesn't exist yet. This is possible using deferred bindings, a feature built-in to October.

The first step is to tell the uploader that we are using deferred bindings by setting the component property deferredBinding to 1.

[fileUploader]
deferredBinding = "1"

Make it working as user Avatar

See this topic: https://octobercms.com/plugin/support/netsti-uploader/tips-to-make-it-working-as-user-avatar

  • Found the plugin useful on 25 Apr, 2017

    Great plugin for us!

  • Found the plugin useful on 13 Apr, 2017

    Useful

  • Found the plugin useful on 11 Apr, 2017

    works without problems to upload images. i use it too for the profile image upload.

  • Found the plugin useful on 9 Jan, 2017

    Excellent plugin. Simple to use and just works! Using it on two projects.

  • Found the plugin useful on 2 Sep, 2016

    I used it to allow my users to upload a profile image. Work like a charm

  • author

    Replied on 2 Sep, 2016

    Thanks! Enjoy it!

1.0.2

Remove RainLab.Builder dependency and work with attachOne relationship

Dec 31, 2016

1.0.1

Initialize plugin.

Apr 05, 2016