Skip to content

Trouble in implementing in custom plugin #57

@faselunare

Description

@faselunare

Hi, i have some trouble
when i click on the browse button rendered by the responsiv/uploader-plugin in my custom plugin, nothing happen. No browser window opening and the drag and drop won't works.

generated code

<form method="POST" action="https://xxxxxxxxx.xxx/en/forum/u/myuser" accept-charset="UTF-8"><input name="_session_key" type="hidden" value="8Idqq6sUYQG3JVWny9Gd5MGcnuFWIKZbrRnOI3Hm"><input name="_token" type="hidden" value="BL47ZH7yPTi0GzVbxHqNMlA7O2jmwX38gxpjGk0N">
    <!-- File uploader -->
    
    
<div class="responsiv-uploader-fileupload style-file-single is-populated" data-control="fileupload" data-template="#uploaderTemplateimageUploader" data-unique-id="imageUploader" data-upload-handler="onUpload" data-file-types=".jpg,.jpeg,.bmp,.png,.webp,.gif,.svg,.js,.map,.ico,.css,.less,.scss,.ics,.odt,.doc,.docx,.ppt,.pptx,.pdf,.swf,.txt,.xml,.ods,.xls,.xlsx,.eot,.woff,.woff2,.ttf,.flv,.wmv,.mp3,.ogg,.wav,.avi,.mov,.mp4,.mpeg,.webm,.mkv,.rar,.xml,.zip">

    <!-- Field placeholder -->
    <input type="hidden" name="_uploader[avatar]" value="">

    <!-- Upload button -->
    <button type="button" class="ui button btn btn-default upload-button">
        Browse
    </button>

    <!-- Existing file -->
    <div class="upload-files-container">
                    <div class="upload-object is-success" data-id="22" data-path="https://xxxxxxxxx.xxx/storage/app/uploads/public/5df/813/126/5df8131265266577151296.jpg">
                <div class="icon-container">
                                            <img src="https://xxxxxxxxx.xxx/storage/app/uploads/public/5df/813/126/5df8131265266577151296.jpg" alt="">
                                    </div>
                <div class="info">
                    <h4 class="filename">
                        <span data-dz-name="">moog-minimoogmodeld-1.jpg</span>
                    </h4>
                    <p class="size">32.50 KB</p>
                </div>
                <div class="meta">
                    <a href="javascript:;" class="upload-remove-button" data-request="imageUploader::onRemoveAttachment" data-request-confirm="Are you sure?" data-request-data="file_id: 22">×</a>
                </div>
            </div>
            </div>

    <!-- Empty message -->
    <div class="upload-empty-message">
        <span class="text-muted">Click or drag files to upload</span>
    </div>

</div>

<!-- Template for new file -->
<script type="text/template" id="uploaderTemplateimageUploader">
    <div class="upload-object dz-preview dz-file-preview">
        <div class="icon-container">
            <img data-dz-thumbnail src="https://xxxxxxxxx.xxx/plugins/responsiv/uploader/assets/images/upload.png" />
        </div>
        <div class="info">
            <h4 class="filename">
                <span data-dz-name></span>
            </h4>
            <p class="size" data-dz-size></p>
            <p class="error"><span data-dz-errormessage></span></p>
        </div>
        <div class="meta">
            <a
                href="javascript:;"
                class="upload-remove-button"
                data-request="imageUploader::onRemoveAttachment"
                data-request-confirm="Are you sure?"
                >&times;</a>
            <div class="progress-bar"><span class="upload-progress" data-dz-uploadprogress></span></div>
        </div>
    </div>
</script>

</form>

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions