-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
If I dont upload anything, I cant delete initialPreview items #830
Comments
I am not sure I understand your query correctly. If you are meaning, that you cannot delete the intialPreview thumbnails without uploading - then it is not correct. You can delete the initialPreview thumbnails irrespective of whether you upload a file or not. Each item in |
I have the same issue. If I use initialPreview to add images, I can't delete the images unless I upload an image. The delete button is there but it doesn't do anything. Please fix. |
Can you share what is the use case to reproduce and why you cannot delete - because this does not seem to be the correct case? As an example you can cross check ajax scenario 3 example. You can actually delete the initial preview files without needing to upload any file. (cross check the browser console network for the delete ajax URL action being called once you press delete). |
I see the delete works in your demos and that is so weird that I can't make it work. This is my code:
|
@mohammadsj, Try version 4.3.5 |
Folks who have the problem mentioned above... please try sharing a JS fiddle to reproduce your use case. That itself may give you the solution. Currently closing this as not reproducible... will reopen based on feedback. |
Pressing the delete button doesn't do anything in the latest version 4.4.2. But changing to version 4.3.5, it's ok. And in the demo ajax scenario 3 example, that doesn't work as well. Please check. @kartik-v |
@cicadabear I have downgraded it too because of that. |
Get the latest build from dev master guys... |
Bump |
Hi Kartik, Remove button is not visible on recent versions (v4.4.8 and v4.4.9) when initialPreview is displayed. Thanks |
Hello Friend. I have a question I am using to upload files but at the moment of deleting it, the filepredelete action does not work for me. I have to preload in the initialPreview to be able to eliminate it should not leave that option without nesecidad of that |
The button is being rendered but it is hidden by css Currently I am using the fileinput for user avatar like in the example. Despite not quite understanding whats going on, I dug into the .js and found two things, maybe someone can explain me :-) First thing is, why some function called _setFileDropZoneTitle sets whether input is new or not. So I added condition if no initial preview is set. But I think that there has to be some beter place to check if the input is new or another logic into css has to be added. Maybe file-input-ajax-new should be added only if file-input-new was present.
But _asInitialPreview() also didnt work as expected, because we have initial preview only if it cant be overwritten? So i removed this part of condition
and now it works as expected. If some picture is set as initial preview, the remove button is displayed, when pushed or no initial preview is set, remove button is not visible. |
Some problem like @Dannyson ! I've an avatar preview initialized. If I want to remove the pic, I can't cause button Remove is not initialized. I've to upload a new image then remove button appear and i can't remove pic. (no-ajax version). |
|
If we don't provide deleteUrl (or url in initialPreviewConfig) the event "filebeforedelete" does not even triggered! Is there any solution for my simple use case: Check a checkbox whenever user clicked "remove" action on initial preview file. then sending this as a form value when form is posted. server reads that and delete the file if should (or update it if user sends a file) |
same problem |
sample codes as below:
|
Hi Kartik, how can I remove the selected image(item) from the initial preview without deleting the item from the Database? I want to handle the deleting on the server side after form submission. Thanks for your assistance top guy |
I have a problem. When I try to delete image from the edit list delete button does not work, but if I upload anything than works. I have configured fileinput like this:
Please Help.
The text was updated successfully, but these errors were encountered: