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

Add support for handling field type upload and uploadMany. #38

Merged
merged 6 commits into from Sep 10, 2019
Merged

Conversation

yajra
Copy link
Owner

@yajra yajra commented Sep 10, 2019

  • Add support for handling field type upload and uploadMany.
  • Fix File Upload using field type:upload. #17.
  • Deprecated the following methods: createMessages(), editMessages(), removeMessages() and refactor it to one method messages().

yajra added a commit to yajra/laravel-datatables-html that referenced this pull request Sep 10, 2019
@yajra yajra merged commit 302cd5e into master Sep 10, 2019
@yajra yajra deleted the upload branch September 10, 2019 04:47
@markplus
Copy link

I didn't quite understand how to use this function, now I have to add two uploads, one for PDFs and one for images, even if I see the upload form when I try to upload it gives me this error "A server error occurred while uploading the file"

    public function createRules(): array
    {
        return [
            'categoria' => 'required',
            'title' => 'required',
            'description' => 'required',
            'file' =>'required|mimes:pdf,xlx,xlsx,xls,csv,txt|max:10048',
            'image' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:2048'
        ];
    }
        ->editors([
            Editor::make()
            ->fields([
                Fields\Text::make('categoria')->label('Fornitore'),
                Fields\Text::make('title')->label('Nome'),
                Fields\Text::make('description')->label('Anno'),
                Fields\File::make('file_path')->label('Listino')->type('upload'),
                Fields\Image::make('image_path')->label('Formato')->type('upload'),
            ]),
        ])

Where am I doing wrong?

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

Successfully merging this pull request may close these issues.

File Upload using field type:upload.
2 participants