1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

fileupload Odd (Unintuitive) Delete Behavior

Discussion in 'Community' started by ncy, May 18, 2019.

  1. ncy

    ncy New Member

    Level: Community
    Hi, I've been playing around with the fileupload plugin, and it took me awhile to understand what was going on with deleting.

    AJAX uploads OFF:
    1. Upload a file and save the record.
    2. Edit the record. The file link appears with a delete button.
    3. Click Delete and confirm OK to delete the reference to the record.
    4. Click OK again to delete the file from the server.
    5. First unexpected thing: the file link still appears.
    6. Second unexpected thing: the file itself is still in the uploaded folder.
    7. If you click Back on the browser (or reload the page), and then edit the record again, it seems that the reference to the record actually was deleted (and now the file link does not appear), but the file itself still has not been deleted.
    8. Third unexpected thing: the only way to get the file to delete is to save the record immediately after confirming to delete from the server. It isn't intuitive that the file has not been deleted just because the user didn't click Save.
    When AJAX uploads are ON, the behavior is more correct, but still some things to point out:
    1. Upload a file.
    2. Click the X, and the file disappears from both the page and the server.
    3. After deleting the file, the "File name" heading is still there.
    4. There's no popup to confirm deletion of reference only.
    Questions:
    1. Shouldn't the behavior for AJAX uploads OFF be the same as AJAX uploads ON (i.e. the file link should disappear after deleting from reference, and the file itself should immediately be deleted when confirmed to delete from server)?
    2. Should AJAX uploads ON have a separate confirmation dialog for deleting the reference only?
    3. Is it possible to set a configuration option to determine what confirmation dialogs you want to appear?

    Joomla 3.9.6
    Fabrik 3.9
     

    Attached Files:

    Last edited: May 19, 2019
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Yup, this is one of those things that's on my (long) To Do list for the upload element.

    -- hugh
     
    ncy likes this.
  3. ncy

    ncy New Member

    Level: Community
    Thanks for the reply. Good to know this element is in the work queue.

    I found some more things (AJAX uploads ON):
    1. Set element's "If existing image found?" to "Leave original file & increment new file's name."
    2. Click on Add Files and choose a file.
    3. Click on Add Files and choose the same file.
    4. The file will be listed twice, which is confusing to the user when they know nothing about suffixes being added behind the scenes.
    5. Now click X to delete the last one. Instead of deleting the file with the suffix, it deletes the original file.
    6. Add a query string to the URL (e.g. ?hi=there).
    7. Click X to delete file. Regardless of whether you click OK or cancel, the query string is always lost. Using the href "javascript:void(0)" would solve this, as well as prevent the page from returning to the top after clicking OK/cancel.
    8. Try adding more than the maximum number of allowed files. The error message is: "You\'ve reached the maximum number of images that can be added to this record" -- with the extra backslash for the apostrophe, and the word "images" even though the files can be of many other types.
    9. With Obfuscate Filename ON, before saving the record for the first time, if you upload a file and then delete it, it won't delete the file with the obfuscated filename.
    Another side note, the automatic Preview popup after choosing a file is a little annoying. It'd be nice to have a feature to turn this off.
     
    Last edited: May 27, 2019
  4. sunnyjey

    sunnyjey Active Member

    Level: Community
    I guess, FileUpload Plugin is most widely used plugin. Hope to get these bugs sort out in near future, specially the automatic Preview popup after choosing a file.
     

Share This Page