How can I remove file from multiple files

How can I remove file from multiple files

Aryan1703Aryan1703 Posts: 77Questions: 20Answers: 1

This is how I am uploading multiple images through a link table. I have added a clearText but it does not seems to work for multiple.


{ label: "Upload Image", name: 'ops_analysisImg[].id', type: 'uploadMany', display: (fileId, counter) => `<img src="${editor.file('ops_analysisImg', fileId).web_path}"/>`, noImageText: 'No image', clearText: "Clear", },

This is my serverside script


->join( Mjoin::inst('ops_analysisImg') ->link('ops_dailyLog.id', 'ops_imglinktable.logID') ->link('ops_analysisImg.id', 'ops_imglinktable.imgID') ->fields( Field::inst('id') ->upload( Upload::inst($_SERVER['DOCUMENT_ROOT'] . '/operations/uploads/__NAME__') ->db( 'ops_analysisImg', 'id', array( 'filename' => Upload::DB_FILE_NAME, 'filesize' => Upload::DB_FILE_SIZE, 'web_path' => Upload::DB_WEB_PATH, ) ) ->validator(Validate::fileSize(500000, 'Files must be smaller that 500K')) ->validator(Validate::fileExtensions(array('png', 'jpg', 'jpeg', 'gif'), "Please upload an image")) ) ) )

Answers

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin

    I have added a clearText but it does not seems to work for multiple

    Do you mean if you select multiple rows and click the clear button? Or something else?

    Allan

  • Aryan1703Aryan1703 Posts: 77Questions: 20Answers: 1

    No, I mean multiple photos. With sigle photo selection ( different code no linking table req for that) I was able to remove them but with this I can't.

    Thanks in advance!

  • Aryan1703Aryan1703 Posts: 77Questions: 20Answers: 1

    Any idea?

Sign In or Register to comment.