FDP Uplaod

The Datafund App now has an option to upload a model or dataset from a shared pod. Doing so is straight forward. You just need a shared pod reference. There are multiple ways to obtain a shared pod reference. One is to use the FairOS Desktop Apparrow-up-right, or simply use your console to interact with FairOS.

If you don't have FairOS, check how to run it locally herearrow-up-right.

Pod Reference

Here we will use console. If you already have an FDP account skip this step.

Creating an FDP account

To register new account run the following command. Just replace the YOUR_USERNAME, YOUR_PASSWORD and YOUR_MNEMONIC placeholders with appropriate values.

curl 'http://localhost:9090/v2/user/signup' -H 'Content-Type: application/json' -d '{"userName":"YOUR_USERNAME","password":"YOUR_PASSWORD","mnemonic":"YOUR_MNEMONIC"}'

Log in to FairOS

Login to FairOS with your username and password:

curl 'http://localhost:9090/v2/user/login' -H 'Content-Type: application/json' -d '{"userName":"YOUR_USERNAME","password":"YOUR_PASSWORD"}' -v

In the command output, you will see text similar to this:

Set-Cookie: fairOS-dfs=MTczMDcyMTE0M3xsRkpSakF4VXl1R19sWGZYM2NCSG5jMHdITmZudHZ5UVBjX1dsUUZ0SUc5NWhXYmg4M1VDZVI5YU0tREdoOVp3M1pnZ0xvc284eC1uTWpJbTZLWnFaeVQ4aFdmeFFOVTJYY09YRkpqTW9zeDZqRWhEQzJZWlhXazNsdi1zYlA1THFOblFNazNOT1ZXUnF1UHBHRG8tVnA1MjJKMnRUU2VEMVRSMVlfUDhNSjg9fLiIkdEpvotKxBkus1dyrMjEqPkOYqX8lNOeTXd_dv5d; Path=/; Expires=Tue, 05 Nov 2024 11:52:23 GMT; HttpOnly; Secure; SameSite=None

Save the text starting from the fairOS-.... That's a cookie that needs to be included into next requests.

If you already have a pod with uploaded data, then skip the following steps.

Creating a pod

Now create a new pod. Make sure to insert the cookie text that you have just saved into the placeholder COOKIE_CONTENT. Replace also POD_NAME with name of your pod and POD_PASSWORD with password that will be used to encrypt pod data.

Uploading a file

Now create a sample text file that will be uploaded to your new pod. Name it test-doc.txt and create it in the current directory. Again, replace placeholders POD_NAME and COOKIE_CONTENT with previously created pod name and the saved cookie respectively. Then to upload it to the newly created pod, run:

Sharing a pod

To obtain a pod reference the pod must be shared first. Replace placeholders POD_NAME, POD_PASSWORD and COOKIE_CONTENT with previously created pod name, password and the saved cookie respectively. Then run:

You will see an output similar to this:

The long string is your pod reference.

FDP Upload From Datafund App

Open the Datafund Apparrow-up-right. Sign in with preferred method and open the new model page.

Fill the required fields and in the Files section select FDP. Paste the pod reference into the filed there.

Click submit and your model will be published to Datafund App.

Last updated