IE6-specific file upload behavior on update

JeTDoG

New member
I've been customizing an implementation of DaDaBIK for use as a poor man's CMS for a couple of weeks now, and generally speaking, I'm quite happy with it. Unfortunately, I have a problem that is very much of a showstopper, considering how much the system I'm putting together relies on file uploads.

Let me start off by stating that I'm using DadaBIK 4.2, MySQL 5.0.51a, and Windows 2003 server-side. Client-side, I've tried IE6 (our in-house standard) and Opera 9.64 (my browser of choice).

When I enter a new record into a table, with an uploaded file, everything works fine. If I attempt to edit a record that has an existing file associated with it, specifically if I want to re-upload the file (for example, if the file contents have changed), that's when things break down.

In Opera, everything seems to work pretty well. When I re-upload the file, it is given an incremented file name, the proper entries are made in the database, and the original file is deleted, or not, depending on the status of the delete checkbox.

In IE6, this same behavior generates one of the following scenarios, depnding on the particular circumstance:

if the delete checkbox is NOT checked, the file is uploaded twice (_2 and _3), with proper entry (_3) made in database, but two extra files sitting there -- this can be problematic for larger files if I don't keep after it

if the delete checkbox is checked, the file is seemingly uploaded only once, but no entry is updated in database, so the database now points to the non-existent (deleted) file

just for the heck of it, I tired to see what would happen in IE6 if I made the file name a non-required field and tried the deletion & re-insertion in two separate steps -- the deletion occurs correctly, but then the insertion from the update screen causes the same double-upload, though the database entry is correct and there's only one extra file -- this still isn't good

Unfortunately, moving away from IE6 (either to another browser or upgrading to IE8) is not an option.

Any thoughts?
 

DebbieS

DaDaBIK Guru
I've been keeping an eye on my installs and have not been able to replicate the problem you describe. Sorry I cannot help.

 
Hello!

I have the same problem.
I use Dadabik 4.6 beta.

When I delete a (image)file, it is deleted from the database, but not from the upload folder.
Uploading it again (for example changed, but same filename) it is stored with a different extension (image.jpg_2 and not with original image.jpg ).
How can I fix it, the file is also deleted from the upload folder?
Tanks
Mario
 

eugenio

Administrator
Staff member
Hi,
when you say "delete a file" you mean delete using the delete checkbox or delete the record?
About the renaming, it should be image_2.jpg, are you sure you get image.jpg_2 ?
 
You are right: the new name is image_2.jpg!
Yes, when I use the delete checkbox.
When I delete first (saving the record) and upload after again, the original file is deleted from the upload folder.
When doing it in one step (deleting and new file at the same time) the original file is still in the upload folder and the new is stored with new name (image_2.jpg).
Now I know it and its not a real problem anymore.
Thanks
Mario
 

eugenio

Administrator
Staff member
If you upload a file with the same name yes, the new file gets the _2 suffix, but if at the same time the delete checkbox is checked the old file is deleted.
 
Top