awes-io / form-builder

👷A component that allows creating forms with two-way binding from data object with default HTML fields and custom, like multi-block or AJAX-select.

Home Page:https://www.awes.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

<fb-uploader> Upload don't work

spawnkiller100101 opened this issue · comments

Hello !

I try AWES since one week. But I have problem with <fb-uploader> , i cant upload a file.

i put it on my modal-window:

<modal-window name="boxes" class="modal_formbuilder" title="Create">
        <form-builder url="{{ route('boxes.store') }}" :disabled-dialog="true" enctype="multipart/form-data" @sended="AWES.emit('content::boxes:update')">
            <fb-uploader name="file" url="boxes"></fb-uploader>
        </form-builder>
    </modal-window>

When i select a file, the statute change from Finished. That's fine. But the file wasn't uploaded and if ($request->hasFile('file')) dont work too.
So, i dont understand what is the problem, maybe i forgot something.
If anyone has an idea or something i forgot, i'm blocked.

Thanks

I have this when I select file in the uploader input:

SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at s.addFileNameToForm (main.js?v=20200915211023:7)
    at gn (main.js?v=20200915211023:7)
    at s.n (main.js?v=20200915211023:7)
    at gn (main.js?v=20200915211023:7)
    at s.t.$emit (main.js?v=20200915211023:7)
    at s.allEvent (vue-uploader.js:2837)
    at n.<anonymous> (event.js:43)
    at each (utils.js:63)
    at n.trigger (event.js:42)

I think I dont understand that :

Component features
The example above requires the response of the following type after loading the test-file.txt file to /upload-files in order to run correctly:
  {
       "meta": {
             "path": "/tmp/da8fhd7gh54da8fh74f7f747gh54df7f/test-file.txt"
        }
   }
This path will be sent to the field of the files form.

Where I put this ?