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

[Bug] dropzone field does not work #5250

Closed
rezahmady opened this issue Aug 1, 2023 · 3 comments
Closed

[Bug] dropzone field does not work #5250

rezahmady opened this issue Aug 1, 2023 · 3 comments

Comments

@rezahmady
Copy link

rezahmady commented Aug 1, 2023

This dropzone field has problems that it doesn't work properly:

  1. No matter what is temporary_disk value in the field attributes, it adds a /storage prefix to the first of image url and it cannot be done in any way.

  2. It does not move the file from the temporary folder to the main folder after saving. i added this part to field attributes
    'withFiles' => [ 'disk' => 'local', 'path' => '/uploads/images', ],

  3. Since I use a language other than English, the part of the setup method is set for me like this:
    CRUD::setEntityNameStrings(trans('vod::lang.video_singular'), trans('vod::lang.video_plural'));

This causes it to misidentify the upload link and put the word 'ویدیو' instead of 'video', which actually doesn't work, and I have to add the following part in the field parameters so that there is no error:
'configuration' => [ 'url' => '/admin/video/dropzone/upload', ],

In general, the field does not work with all these explanations.

@welcome
Copy link

welcome bot commented Aug 1, 2023

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication channels:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;
  • Showing off something you've made, asking for opinion on Backpack/Laravel matters - Reddit;

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

--
Justin Case
The Backpack Robot

@karandatwani92
Copy link
Contributor

Hey @rezahmady
I just tested it & found everything working.

What I can understand so far is The disk is not configured in the right way config/filesystems.php.
Your disk misses attributes to access the files url, visibility to allow files access via web URL.

And to make your config work, you need to link storage via php artisan storage:link --force
This command creates a filesystem link(a public shortcut to the disk folder as per your config) to access the files.
Screenshot 2023-08-11 at 12 27 43 PM

Also, you will notice after using url attribute. The dropzone field will not append storage in the URL. It will start appending your url value.

Please go through https://laravel.com/docs/10.x/filesystem#the-public-disk for more info

@pxpm
Copy link
Contributor

pxpm commented Aug 11, 2023

Thanks @karandatwani92

Please @rezahmady let us know if @karandatwani92 answer helped you or if still facing issues.

Cheers

@pxpm pxpm closed this as completed Aug 11, 2023
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

3 participants