1
0
-1

Hello,

I try to create a form in the workflow and this form can be updated multiple times. In this form there's a field for user to upload file (both image and others)

I'd like to record the history of this upload file field (or record the file list of this upload field), so that I know that someone has deleted or added new file when they submit the form (this form can be submitted multiple times).

I have configured the field so that it will not delete the actual file during overwrite and removal

I also managed to get all the file link and append it in a list using custom html. Each file link looks like this:

localhost:8080/jw/web/client/app/AttachmentCheck/1/form/download/addAtt/1c3da58a-ee1e-424e-862d-d1ca667d90a0/testdemo1.png.

However, when user delete the file previously uploaded and submit the form, the link become unusable, so I cannot record the history of this upload file field, since I need to be able to open all files even when it is deleted by user afterward.

It would be great if you can share with me how to record the history of this upload file field.

I need to access the history as a workflow variable so I don't think a audit trail plugin is suitable.  

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      User 2 tables/forms. One lets say called "Uploads" where you keep updating the current record and a separate table lets say "Upload_History" where you add a record every time someone submits a form. This way you can keep a single record with the combined data and history of every upload.
      If you want my assistance in creating JOGET applications, you can contact me at anas@rippleberry.net

      1. manh

        that's one way to record form history, thank you for sharing your ideas!

        I still wonder if the file someone uploaded in form A in a previous workflow assignment is deleted or not if someone remove or replace it when they edit form A in a later workflow assignment. There's actually an option for user to choose whether to "Delete the Actual file..." so I'm assuming if the form designer does not explicitly choose to delete file, then the files are still somewhere in the database.

        If the file is not deleted, it would be great if we can still access it somehow. In your method, since we have original form and will create a new record of the second form whenever user create or edit the original form, we are cloning all files in every time user update original form. In my case, because the form can be updated 4-8 times in the workflow, if user upload 1 file when they create the form, it will be cloned 4-8 times when the flow finishes.

      CommentAdd your comment...