How do you move file attachments between apps

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
I am in the process of building a single project management app and have several other apps that we will be transferring data from. That seems to be the fairly easy task, but the question becomes of the file attachments. Is there a process for moving the attachments or can this be done.
Photo of Joey Zint

Joey Zint

  • 1,870 Points 1k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,698 Points 20k badge 2x thumb
If you have less then 50, manually will be quickest, if more than that, 

The quickest way is going to be through an API script.  You will need to make sure you have the record ID# brought over with the other Data import.  (maybe import the RID into a field called [Legacy RID])  

Then you'll need somebody to write a script to more the documents.  

I don't know of any off the shelf scripts that do this, but somebody out there might.

You can always commission somebody to do this as well.  shouldn't take more than 2 hours to make the applications ready and write the script correctly.
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,224 Points 20k badge 2x thumb
This can be done with script using the FormData, and Fetch APIs.


Fetch API

I haven't posted a lot of examples of using FormData yet but here is one I created in answer to this question:

Creating 2 records (in two different apps) using only 1 form

Pastie Database

Triplicate Forms

In a nutshell the FormData API allows you to manipulate forms and the fields they contain including file fields. The Fetch API is the replacement for XHR (XMLHttpRequest) and it can accept FormData directly. All browsers support these features today and you are only locking yourself out of a whole pile of goodness if you do not use them.

I am a tab busy at the moment but if you need help with this feel free to contact me off-world using the information in my profile: