Replies: 2 comments
-
|
Hey @btrumsey What do you mean by image source? A few example values would help to understand the need. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
By image source I mean the URL of the image when it is dragged and dropped from a website. BTW, I now realize that the implementation I have above will only work for a single dropzone field on the page. To support multiple dropzones the field name would need to added to the name of the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
My application requires that I track the original source of images that users add to the site through a
dropzonefield. This is not natively supported by Backpack or the dropzone component, but I did find that it is quite easy to implement and thought it might be a nice feature to add to Backpack. My implementation is as follows:Add a new hidden field to the
dropzone.blade.phpfile:The image source URL can then be inserted into this hidden field with the following Javascript (also added to the
dropzone.blade.phpfile):I also have a callback function,
addImageSource, that is called when an image is dropped to dynamically update the page with the source information. This should be implemented as an optionalcallbackproperty on the dropzone field... just been too lazy to go the last mile and implement that part properly.Beta Was this translation helpful? Give feedback.
All reactions