Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
8 years ago

Migrating records with attachments

Is there a way to migrate records with attachments from one App to another App without downloading each attachment and re-attaching (uploading) individually?
  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    If both app already in production you will want to do a file download script, which takes some custom programming.

    If the app you are transfering to is new, an option is to;
    Copy the old app WITH file attachements, and then transfer the table into the new app.

    Really depends on where you current apps are at in production and what details you need.
  • I just transferred a small binary file from one field to another field within the same application without downloading it. I used the fetch API, and the FormData API transferring the file as a blob. No API token needed as I did not use the QuickBase API.

    ...

    I just did it again with a 5meg photo and it worked seamlessly. I even renamed the photo when uploading. You will cry tears of joy when you see how short the code is.
  • Could you provide more details?  Need to know exactly how to do this.  Getting my Kleenex box for those tears.  
  • I will post further tomorrow - I am getting serious backed up with all my other work.
  • Okay this procedure works. How do you intend to implement this? What is determining the record the file is being sent to (new record or existing record)? How do you intend to invoke this functionality (button click on record)?
  • How many file attachment fields are you looking to migrate?  How many records have files in them that you want to copy?  

    I just did this for a client of mine, I copied 150K files (113GB) from 8 file attachment fields in 1 app to another....it took about 90 hours of processing time to complete :)