Cointime

Download App
iOS & Android

NFT Teams: Free Yourself From Never-Ending IPFS Pinning Fees by Uploading Images to Arweave via the CLI Method

another lifetime, I was actually a marketing & business development director at a regional CPA firm. And prior to that, I was in marketing and business development at Deloitte. So, I’ve had a ton of marketing and sales training throughout my crazy-long career (I’m old — a GenXer through and through). Anyway, in that training, there’s a famous sales maxim that uses the mattress industry as an example: You aren’t selling mattresses, you’re selling sleep.

And, really, that is what Arweave, a decentralized data storage protocol, provides for the NFT space (and for other general permanent-storage-dependent business / industry niches, of course).

Yes, Arweave is a product / service. Yes, it’s a storage protocol. But those descriptions miss the mark because it’s the benefits of using Arweave that set it apart from the nonstop hassles of IPFS. IPFS is a mattress; Awreave is nice, peaceful sleep.

Okay, enough with the metaphors! Let’s get into some tech stuff. 

In the above, I was new to exploring the protocol, and I began by using the excellent GUI / web site, ArDrive. I still use ArDrive via the site/app, as it’s just a super interface and very intuitive. And, you know, even if you live life on the command line, it’s still nice to work visually on some things.

That all said, as I continued to explore Arweave, I realized that some specialized things I was doing called for a programmatic approach. And for that, ArDrive offers a CLI (here’s the github repo). It has various install options. For me, just a quick npm install & it was ready to go.

The github repo linked to above has super documentation that will cover most of the situations you’ll have when uploading. I thought I’d show some concrete examples of my own little process, just to show how easy it is to upload images. So, here’s my own process:

Prerequisites

You of course to have AR tokens in your Arweave wallet (how-to here), and you need to have the CLI installed in your IDE (see above).

1. Break your files into manageable chunks locally (in prep for uploading)

To be honest, I’m not 100% sure what the upload limits are. The repo mentions that that there is no theoretical limit on numbers of files (although you could be uploading thousands of really tiny files, so that’s understandable). But all in all, I seem to recall a 2–3 GB total size limit stated somewhere. I was definitely able to successfully upload MORE than the stated limit using the app, and I think the CLI allows even a bit more than the app does. (I’ll clarify this part later.) But anyway, for practical purposes, maybe limit your first few uploads to a few gigs, and go from there with pushing the limits. (Also, in fairness, it could depend on some outside factors. For instance, I have giga-bit service here, so I can upload at crazy high speeds, which might mean my limit differs from yours.)

2. Establish a folder into which you’ll put your NFT images.

While the CLI will let you easily do this, I actually like to just be on the ArDrive app for this part. You just click NEW and then “New Folder” and then name it. I’m in my “z_dog” drive here, and I’ve just made a folder called “test1”. When it’s done, I just click on it (and it highlights in pink — super handy) and then I click the info button (top center), and the right panel pops up where I can click the Folder ID icon to auto-copy that.

From there, I have a folder locally called “sample” into which I’ve popped 6 sample images for this article. So, to upload that, I simply need to go to a terminal and pop in the command:

ardrive upload-file --local-path /path/to/folder --parent-folder-id "FOLDERID" -w /path/to/wallet.json

Customize that with your folder ID (as copied above), paths to the upload folder, and wallet path, of course. But, upon running that, it soon returns a JSON wad of data related to what you just did there.

The top item is always a folder because I’m uploading a folder myself, and so that’s the ArDrive folder info for that local folder. (Did I say “folder” enough in that last sentence? lol). And below that is the data I sent and the various properties for each item.

BTW, if I wanted to fetch all of the individual file data as a nice clean JSON file, I could now run…

ardrive list-folder --parent-folder-id"e6be9dd8-e100-4a91-a822-c541076a87da"

… and I’d get a big JSON set of that whole folder:

That “dataTxID” is key for linking back out. We just preface it with https://arweave.net/ and, for example, the URL…

https://arweave.net/A4izFjirmqqs3Jhne1eYX0uwj5_dewAr4LZYLLECDvI

… indeed shows the dog I just uploaded:

(That’s a copy of an image from my Loopies NFT drop. Go grab one — the floor is currently just 48 cents! lol.)

Dealing with Latency

One important note here is that there’s a bit of latency in the system, in that Arweave needs some time to take in your upload and get it all situated. (“Situated” is a fine technical term, right?) The more you upload, the more time it needs (although, relatively speaking, it’s fairly quick). But, that’s why I wanted to show you the “list-folder” command — because you shouldn’t count on the immediate JSON response as being the final one.

The system needs a few minutes to fully process things. In fact, one thing that I’ve come to do as I upload is that I’ll do an upload (e.g., let’s say I’m uploading 1,000 NFT images), and then I’ll wait like five minutes and I’ll then run the “list folder” command. Then, I’ll save the JSON output of that to a file and programmatically iterate over that file to count the dataTxId instances. If my count matches the number of files that I uploaded, then it’s all finalized on Arweave. If the count comes up less than I expected, then it’s not done processing yet. (So I give it a few more minutes and then re-request the folder data via list-folder.)

And then, of course, once I know all 1,000 files are there, and have dataTxIds, I then simply iterate again over the final JSON file (from the list-folder command) and this time I save the dataTxIds into my database of NFT data. (Note that the JSON file includes the “name” field, which is the name of the file I’ve uploaded. So, that’s how I match up the dataTxIds to my NFT database when I do that update.)

Your own processes will vary, of course. Again, see the robust documentation for the ArDrive CLI tool! But the point is that there are many options for uploading files, both GUI and CLI, and they’re all easy, user-friendly, and intended to be permanent with no ongoing pinning fees, which means you’ll sleep better. 

https://medium.com/web-design-web-developer-magazine/nft-teams-free-yourself-from-never-ending-ipfs-pinning-fees-uploading-images-to-arweave-via-the-a94ca51e99f4

NFT
Comments

All Comments

Recommended for you

  • Iranian Navy Launches 88th Wave of 'True Commitment 4' Operation

    On March 31, the Islamic Revolutionary Guard Corps (IRGC) of Iran announced that at dawn today, the IRGC Navy initiated the 88th wave of the 'True Commitment 4' operation, delivering significant strikes against multiple U.S. and Israeli targets in the Persian Gulf and surrounding areas. The announcement stated that the IRGC Navy used ballistic missiles to hit an Israeli container ship in the central waters of the Persian Gulf. In a subsequent series of coordinated strikes, a U.S. Marine Corps outpost along the UAE coast, an anti-drone system deployed by the U.S. Fifth Fleet near Bahrain's Manama Airport, and two advanced early warning radars located at a U.S. military base in Kuwait were all precisely and destructively targeted by drones. The announcement emphasized that the Strait of Hormuz is now completely under Iran's strict control, and any hostile provocation will face retaliation from missiles and drones. (CCTV International News)

  • Iran's Revolutionary Guard Claims Attack on Ship in Gulf Region

    According to Tasnim News Agency: The Iranian Revolutionary Guard stated, 'We have attacked a ship in the Gulf region.' (Jinshi)

  • Dubai Releases Regulatory Framework for Crypto Derivatives

    On March 31, the Dubai Virtual Assets Regulatory Authority (VARA) released version 2.1 of the 'Trading Platform Service Rules Manual,' which clarifies the methods for licensed crypto companies to offer crypto derivatives trading in Dubai. The framework covers requirements such as customer suitability, leverage and margin controls, asset segregation, disclosure standards, and regulatory intervention authority. This framework applies to licensed Virtual Asset Service Providers (VASP) operating in Dubai.

  • 360 Smart Agent Discovers High-Risk Vulnerability in OpenClaw, Potentially Affecting 170,000 Instances Worldwide

    On March 31, according to Guoshi Direct, it was reported by 360 Digital Security Group that its independently developed 360 multi-agent collaborative vulnerability mining system has discovered a high-risk vulnerability in the OpenClaw platform—specifically, a local file exposure vulnerability due to MEDIA protocol prompt injection bypassing tool permissions. This vulnerability has been officially confirmed by the National Information Security Vulnerability Database (CNNVD) and affects over 50 countries and regions worldwide, with more than 170,000 publicly accessible OpenClaw instances facing security risks. The core risk of this vulnerability lies in the fact that the MEDIA protocol operates at the output post-processing layer, allowing it to completely bypass platform tool policy controls. Even if agents disable all tool calls, attackers can initiate attacks solely based on basic member permissions in group chats, directly stealing sensitive information from servers, which could easily lead to subsequent cyberattacks.

  • Tehran Hit by New Wave of Attacks, Multiple Explosions Reported

    On March 31, according to CCTV News, at 5:51 AM local time on March 31, the Iranian capital Tehran was hit by a new round of airstrikes. Multiple explosions occurred in Tehran.

  • A-shares Trading Volume Exceeds 1 Trillion Yuan

    On March 31, the trading volume of the Shanghai and Shenzhen stock markets exceeded 1 trillion yuan, a decrease of over 40 billion yuan compared to the same time the previous day.

  • BTC Surpasses $68,000

    Market data shows that BTC has surpassed $68,000, currently priced at $68,028, with a 24-hour increase of 2.12%. The market is experiencing significant volatility, so please ensure proper risk management.

  • Spot Gold Rapidly Rises, Surpassing $4,570

    Spot gold has seen a short-term increase, rising by 1.3% and surpassing $4,570 per ounce.

  • Trump Willing to End Iran War Despite Closure of Strait of Hormuz

    On March 31, the Wall Street Journal reported that U.S. government officials revealed President Trump has indicated to his aides that he is willing to end military actions against Iran even if the Strait of Hormuz remains largely closed. This move could extend Tehran's firm control over the waterway and leave the complex task of reopening the strait for later. Recently, Trump and his aides assessed that reopening this crucial passage would push the conflict beyond the four to six-week timeline he has set. Trump has decided that the U.S. should achieve the primary goal of weakening Iran's navy and missile stockpiles while gradually ending current hostilities and applying diplomatic pressure on Iran to restore free trade. Officials stated that if this approach fails, Washington will pressure its European and Gulf allies to lead efforts to reopen the strait. They noted that Trump could also opt for a military solution, but this is not his current priority.

  • US Stock Index Futures Rise as Reports Suggest Trump Willing to End War Without Opening Strait

    On March 31, US media reported that Trump is willing to end the war without opening the strait, leading to a short-term rise of 1% in the three major US stock index futures, with the Nasdaq currently up 0.5%. WTI crude oil quickly erased its intraday gains and turned negative, while gold saw a slight increase, with its gains expanding to 0.7%.