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

Dropzone crud field not uploading #1161

Closed
tomjrjones opened this issue Sep 18, 2024 · 1 comment
Closed

Dropzone crud field not uploading #1161

tomjrjones opened this issue Sep 18, 2024 · 1 comment

Comments

@tomjrjones
Copy link

Bug report

What I did

Added dropzone as crud field

      CRUD::field([
        'label' => 'Image Gallery',
        'name' => 'image_gallery',
        'type' => 'dropzone',
        'withFiles' => array(
          'disk' => 's3',
          'path' => $storagePath
        ),
        'tab' => 'General'
      ]);

What I expected to happen

??

What happened

On the FE I get [object Object] error, and also this error

2

#2 upload (ajax) (21:06:34)
8.3.10
20.61ms
2MB
POST admin/product/dropzone/upload
No query results for model [App\Models\Product] 0
vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php#506
Illuminate\Database\Eloquent\ModelNotFoundException
503
504
505
506 
507
508
509
510
        }

        if (is_null($result)) {
            throw (new ModelNotFoundException)->setModel(
                get_class($this->model), $id
            );
        }

What I've already tried to fix it

use dropzone locally without s3 button, if the images are already uploaded, dropzone shows the previewed images.

Is it a bug in the latest version of Backpack?

After I run composer update backpack/crud the bug... is it still there?

Backpack, Laravel, PHP, DB version

When I run php artisan backpack:version the output is:

8.3.10

### PHP EXTENSIONS:
Core, date, libxml, openssl, pcre, sqlite3, zlib, bcmath, bz2, calendar, ctype, curl, dba, dom, hash, FFI, fileinfo, filter, ftp, gd, gettext, gmp, json, iconv, intl, SPL, ldap, mbstring, session, standard, odbc, pcntl, exif, mysqlnd, PDO, pdo_dblib, pdo_mysql, PDO_ODBC, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, pspell, random, readline, Reflection, mysqli, shmop, SimpleXML, soap, sockets, sodium, sysvmsg, sysvsem, sysvshm, tidy, tokenizer, xml, xmlreader, xmlwriter, xsl, zip, Zend OPcache

### LARAVEL VERSION:
11.18.1.0

### BACKPACK PACKAGE VERSIONS:
backpack/basset: 1.3.5
backpack/crud: 6.7.37
backpack/devtools: 3.1.5
backpack/generators: v4.0.5
backpack/pro: 2.2.17
backpack/theme-tabler: 1.2.11```
@karandatwani92
Copy link

Closing, duplicate of Laravel-Backpack/CRUD#5669

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

No branches or pull requests

2 participants