BFY File Uploader is a program that allows you to upload files to the BlockyFile network. It provides a command-line interface and supports various options to customize the upload process.
Python version 3.6> <=3.9
BFY File Uploader provides pre-compiled binaries for both Windows and Linux platforms, allowing you to run the program without the need for additional installations.
- Download the Windows executable file from the Releases page.
- Unzip all file and put into a folder
- Double-click on the downloaded file to run the main.exe executable.
- Download the Linux executable file from the Releases page.
- Unzip all file and put into a folder
- Open the terminal and navigate to the directory where the downloaded file is located.
- Run the following command to make the file executable:
chmod +x main
- Execute the program by running:
./main
Please note that the pre-compiled binaries are available in the "Releases" section of the GitHub repository.
For more detailed information and usage examples, refer to the documentation.
Before running the program, make sure to configure the .env
file. Follow the steps below:
- Rename the
.env.example
file to.env
. - Open the
.env
file and enter your BlockyFile address and private key. To retrieve the private key from MetaMask, follow these steps:- Open MetaMask and click on the account icon in the top right corner.
- Select "Account Details".
- Click on the "Export Private Key" button.
- Copy the private key and paste it into the
.env
file.
To run the program, you need to install the required dependencies using the following command:
pip3 install -r requirements.txt
After installing the dependencies, you can execute the program using the following command:
python main.py
Please note that Python 3 is required, but versions higher than 3.10 are currently not supported.
The program can be executed with the following flags:
-t
,--time_out
: Timeout time with RPC (default: 1200)-e
,--encoding_type
: Encoding Type of the file. Valid options: base64, base64withpassword (default: base64)-g
,--gui
: Enable/Disable GUI. Valid options: True, False (default: True)-i
,--input
: Path of the file to upload (works only with--gui False
)-rpc
: RPC URL of BlockyFile (default: https://node1.blockyfile.org/)-p
,--password
: Password for base64withpassword encoding (default: Password)-gasprice
: GasPrice for transaction
For more information and detailed usage instructions, please refer to the official documentation. The documentation provides additional details on the program's features, configuration, and usage.
Please note that the issue with Python 3.10 compatibility will be resolved shortly.
For Windows, you may need to install the following package: vc_redist.x64.exe.
The api.py
file located in the tool
directory can be used to run the API server for BlockyFile. Follow the instructions below to execute the script and set the memory limit for contract size:
-
Make sure you have Python installed on your system.
-
Open a terminal or command prompt.
-
Navigate to the
tool
directory of the BlockyFile project. -
Run the following command to execute the
api.py
script:python api.py
or
python3 api.py
Note: Use
python
orpython3
depending on your Python installation. -
If you want to set the memory limit for contract size, use the
-m
flag followed by the desired memory limit. For example:python api.py -m 256
This command sets the memory limit to 256 MB for contract size.
-
Once the script is running, the API server will be accessible at
http://localhost:8080
.
You can now make API requests to the BlockyFile server and retrieve file details or perform other operations.
Please note that the api.py
script should be executed in a secure environment and appropriate security measures should be taken to protect the server and its resources.
The following features are planned for future releases:
- Addition of base85 encoding for reduced cost.
- Integration with third-party web platforms for easier usage in DApps.
- Code optimization for improved performance.
- Fix bugs with python v3.10 and highter.
- Addition of NFTv2 creation functionality directly in the data uploader.
- Addition stats to api.
Please note that these features are not yet available in the current version of the program but they will all be added before the MainNet is released.