Forum Discussion

damienpage's avatar
damienpage
Qrew Cadet
2 months ago

API not deleting attachments

Hi all, hoping someone may be able to assist.

Am using a pipeline to remove attachments using the format of 'fid_14=&delfile_fid_14=1'

The result of this is that whilst the attachment looks to be removed from the form, it still is actually being stored (app file manager shows the attachments still exist).

Has anyone else encountered this or possibly have a solution ?

Cheers in advance.

6 Replies

  • Have you tried going into the field properties for the File attachment field and setting the number of revisions to retain at 1?   Are you OK with not retaining previous versions?

    • damienpage's avatar
      damienpage
      Qrew Cadet

      Good afternoon all and thanks for the reply.

      To be honest at this stage i'm just so confused. 

      After reaching out to support, they inform me that this method will not remove the attachment. 

      They state the only method is use is 'https://api.quickbase.com/v1/files' etc etc

      I wouldn't have ever imagined having to remove attachments would prove so difficult....

      As for the versions, they do not exist and only one image (pic) is attached to a field.

      For example we have say 8 fields that the users are required to upload a single image into each field. Once the record is acted upon we don't need the image.

       

       

       

       

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        So is the symptom of the problem that the file no longer shows in the record, so apparently deleted, but your space is still used up when looking at the total attached files for the table or when using the QuickBase file manager tool?

         

        If so, that sounds like a clear bug to me (but I would be interested to see the full response from support) as I'm not understanding what alternative Pipeline syntax they are suggesting.

         

        A work around is to install the free native multi file upload Plug in from QuickBase's and have the user multi file upload files into a child table (as opposed to uploading into separate fields in the record).  I don't know your actual use case, but the users  may find that a better user experience to multi upload especially if it's pictures off a mobile device.

         

        Then, when the files are no longer required, you can actually delete the records holding the file attachments, and that will surely delete the files. 

  • Hi all and thanks for input. Again i have attempted the above. The file itself is removed from the form, however it still appears in file attachments in app manager.

    Below is the output from the pipeline call

    Type:
    action
    Channel:
    quickbase
    Index:
    b
    Pipeline:
    TRY TO REMOVE ONE SPECIFIC ATTACHMENT
    Step:
    Make Request
    Run timestamp:
    Fri Aug 08 2025 14:33:55 GMT+1000 (Australian Eastern Standard Time)

    Input
    url:
    https://domain/db/bm6v8zsbw/?act=API_EditRecord&rid=179302&_fid_12=&delfile_fid_12=1
    method:
    POST
    disable_ssl_verification:
    false

    Output
    url:
    https://domain/db/bm6v8zsbw/?act=API_EditRecord&rid=179302&_fid_12=&delfile_fid_12=1
    status:
    200
    content:
    <?xml version="1.0" ?> <qdbapi> <action>API_EditRecord</action> <errcode>0</errcode> <errtext>No error</errtext> <rid>179302</rid> <num_fields_changed>1</num_fields_changed> <update_id>1754627635259</update_id> </qdbapi>
    elapsed:
    0.125597

    headers

    json

    qdbapi
    action:
    API_EditRecord
    errcode:
    0
    errtext:
    No error
    rid:
    179302
    num_fields_changed:
    1
    update_id:
    1754627635259

    again any help appreciated...

  • A couple of years ago, there was a bug where if the file attachment was deleted by an API that the File management system  and also your statistics still showed that the file existed and you were consuming space against  your file attachment limits  

    at the time, they definitely fix that bug because I had been working with a client to purge thousands of files attachments and they did fix the bug.  

    If you can actually prove to Quickbase support that that is once again happening then that would be a legitimate bug.

    • hueyal's avatar
      hueyal
      Qrew Trainee

      I have a pipeline that ran yesterday and deleted a file attachment.  The format I am using is:
      API_EditRecord&rid={{a.id}}&_fid_6=&delfile_fid_6=1&vid=1

      How many revisions of the file do you retain?  (See field definition.) In my configuration, only 1 revision of the files are retained; therefore, vid=1 deletes the only revision.  See:  Upload and download files – Quickbase Help