DEV Community

Cover image for The Two-Layer QC Setup That Caught 39 Product Errors Before Upload
Muhamad Revanza Rafif Hamdani

The Two-Layer QC Setup That Caught 39 Product Errors Before Upload

The Two-Layer QC Setup That Caught 39 Product Errors Before Upload

First batch of 12 vectors went to Adobe Stock. All 12 rejected within 48 hours. Reason: CSV header wrong. Not the art. The header. I had spent three days making assets and zero minutes checking the upload file had the columns Adobe demands.

That was the moment I built the two-layer QC setup. It has caught 39 product errors before upload across 1,860 assets made and 1,077 ready or submitted. Here is exactly how it works.

Layer One: Metadata Validation Before the CSV Exists

The first layer runs before any upload file gets built. It checks the raw folder against the rules each platform actually enforces.

Adobe Stock wants a 5-column CSV. Columns are: Filename, Title, Keywords, Category, Releases. No extra columns. No missing columns. Vecteezy wants 4 columns. Dreamstime wants 15 columns. Each one rejects instantly if the header is wrong. Not a human review. A machine check that fails before your art gets seen.

So the check is simple: does every file in the folder have a filename, a title, keywords, and a category? Does the filename match what the platform allows? Are there duplicate filenames? Is every file actually there or did a render fail silently and leave a zero-byte file?

Zero-byte files were the first real catch. A render job died mid-write on the 2 GB RAM server and left a file with the right name and no content. The validator caught it because it checks file size, not just file existence. That one check caught 7 broken files in the first month.

The validation script uses the standard library alone. No install. It reads the folder, checks each file, writes a report. If anything fails, no CSV gets built. The script refuses to proceed.

Layer Two: Post-Build Verification Against Platform Specs

Layer two runs after the CSV is built. It reads the CSV back and checks it against the exact spec for the target platform.

Adobe wants 5 columns. The verifier counts them. Vecteezy wants 4. Dreamstime wants 15. The verifier counts those too. It checks that every row has the right number of fields, that no field contains a comma that would break the CSV structure, that titles are not empty, that keywords are comma-separated and not semicolon-separated.

This caught 14 errors that layer one missed. A title with a comma in it. A keywords field where I used semicolons out of habit. A row where the category was empty because I never filled it in for that particular asset type. Each one would have been an instant rejection.

The verifier also checks for duplicate rows. Running the batch twice without a tracker used to mean double-posting, which gets accounts flagged fast. The upload tracker ledger remembers what has been posted. The verifier checks the CSV against the ledger and flags anything already submitted.

Why Two Layers Instead of One

One layer would miss things. Validation before build catches problems with the source files. Verification after build catches problems introduced during the build itself. They catch different errors.

Layer one caught 18 errors. Layer two caught 21. Total 39. Some of those overlapped in theory but in practice each layer caught things the other could not see. A file that is zero bytes is invisible to a CSV verifier because the CSV just has a filename. A malformed CSV row is invisible to a folder validator because the folder is fine.

The two layers cost nothing to run. Both are standard library Python. They run in under a second on the 1 vCPU, 2 GB RAM server. The whole pipeline ran on that server with no GPU because the checks are not heavy. They are just reading files and counting columns.

The Rules That Matter

Platform rules are not suggestions. They are machine-checked gates. Here are the ones that caused real rejections before the QC setup existed:

  • Adobe Stock CSV must have exactly 5 columns in the exact order they specify. Extra columns cause rejection.
  • Vecteezy CSV must have exactly 4 columns. Different order from Adobe.
  • Dreamstime CSV must have exactly 15 columns. The most complex of the three.
  • Keywords must be comma-separated. Semicolons break the CSV parser.
  • No field can contain an unescaped comma. It shifts every column after it.
  • Filenames must match the actual files on disk. A typo in the CSV means the upload fails.

The metadata builder script writes these headers exactly. Not approximately. The verifier then reads them back and confirms. Two independent checks on the same data, one before creation and one after.

What This Looks Like in Practice

A batch of 50 vectors goes through the pipeline. Layer one checks the folder. Finds 2 zero-byte files, 1 duplicate filename. Fixes those. Layer two checks the built CSV. Finds 3 rows where keywords used semicolons, 1 empty title. Fixes those. The batch uploads clean. No rejections.

Before this setup, every rejection meant waiting days for the platform to respond, then re-uploading, then waiting again. Adobe Stock review times vary but a rejection costs time regardless. The QC setup costs seconds and catches the error before the wait starts.

The 39 errors caught break down into categories: 7 zero-byte files, 11 header or column count issues, 9 malformed CSV rows from commas or semicolons, 6 duplicate entries the tracker caught, 4 empty required fields, 2 filename mismatches. Every single one would have been a rejection or a flag.

The Honest Part

This QC setup is not complicated. It is two scripts that read files and check them against documented platform specs. The hard part was learning the specs by reading the actual platform documentation and then encoding them into checks. That research took time. The scripts took an afternoon.

The full system built from this work is called digital asset factory. It includes the metadata builders, the upload tracker, the validators, the verifiers, and the packaging tools. It is the exact code that packaged 39 products, 856 MB of output, running on a single-core 2 GB server. First paid sale from this pipeline: $2.80. Small number, real proof the system works end to end.

The QC layer is the part I would never skip again. It is the difference between waiting on rejections and shipping clean batches.

Get digital asset factory


Building digital products? Free guides & kits for digital product sellers.

Top comments (0)