Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem this Fieldname is not correct. It must be: file #25

Open
jAKErCZ opened this issue Jan 23, 2020 · 0 comments
Open

Problem this Fieldname is not correct. It must be: file #25

jAKErCZ opened this issue Jan 23, 2020 · 0 comments

Comments

@jAKErCZ
Copy link

jAKErCZ commented Jan 23, 2020

Hi,
I need upload image and last froala this no problem and new froala this upload and error:
Fieldname is not correct. It must be: file

Php

     * @throws \Nette\Application\AbortException
     */
    public function ActionUploadImages()
    {
        // Store the image.
        try {
            bdump($_FILES);
            $response = \FroalaEditor\Image::upload(self::IMAGES_PATH);
            $this->sendJson($response);
        } catch (UniqueConstraintViolationException $e) {
            http_response_code(404);
        }
    }
And $_FILES dump
file => 
         name => "poradna_purenit_nebo_podezdivka.jpg"
         type => "image/jpeg"
         tmp_name => "C:\xampp\tmp\php496F.tmp"
         error => 0
         size => 142879
and initialize

var editor = new FroalaEditor('#board-content', {
            imageUploadURL: {plink Settings:uploadImages},
            language: 'cs',
            height: 500,
            // Change save interval (time in miliseconds).
           // saveInterval: 700,
            // Set the save param.
            saveParam: 'description',
            // Set the save URL.
           saveURL: {plink Settings:save},
            // HTTP request type.
            saveMethod: 'POST',
            // Additional save params.
            saveParams: { id: 'null'}
        });
            document.querySelector('#saveButton').addEventListener("click", function () {
                flashMessage('Dashboard byl uložen','success');
                editor.save.save();
            })
        });```

Please need help thx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant