DEV Community

Miran
Miran

Posted on

The Upload Succeeded, but the Application Still Didn’t Know What the File Was For

A reusable file drop can accept the right bytes while losing the client, period, requested item, review, and reupload context needed for the next step.

A reusable upload destination receiving similarly named files with unknown client, period, and purpose beside a request-specific upload page where each file remains connected to a client, bookkeeping period, requested item, review status, and reupload history
A file upload can return success for Bank Statement.pdf and still leave the application with several unanswered questions.

Which client sent it?

Which bookkeeping period does it belong to?

Was it requested, or did the client send it without being asked?

Is it waiting for review, replacing a rejected file, or already accepted?

The storage operation worked. The bookkeeping workflow still has to reconstruct why the file exists.

That difference changed how I thought about permanent upload links and request-specific upload links. The integration problem was not moving bytes into storage. It was keeping the reason for the upload attached to the file after it arrived.

A reusable destination solves transport

A permanent upload link has an obvious advantage: the firm can send the same destination whenever a client needs to provide something.

The client opens the link, selects a file, and submits it. The team does not need to create a new destination for every collection cycle.

For occasional intake, that may be exactly the right amount of structure.

A client might send an incorporation document, a corrected receipt, or another one-off file. Someone on the team already knows what is expected and can organize the submission after it arrives.

The trade-off appears when the destination is reused across clients, periods, and purposes.

The uploaded object may have a filename and timestamp, but the link itself does not necessarily explain:

  • which client record should receive it
  • whether it belongs to April or May
  • which requested document it is intended to satisfy
  • whether another file is still missing
  • whether the upload replaces something rejected earlier

Those details can be collected afterward through a form, filename convention, email thread, folder structure, or manual review.

That is still a valid workflow. It simply moves more organization to the period after upload.

The request should own the upload context

A request-specific link starts from a different object.

Before the link is sent, the application already knows the client, bookkeeping period, and requested items. The client opens one request page and uploads against that list.

It is important that this does not mean sending one URL per document.

One request for May can contain several items:

  • operating account statement
  • credit card statement
  • payroll summary
  • sales report
  • receipt archive

The client receives one link for the request and selects the relevant upload action beside each item.

That changes the integration boundary. The file is not entering through an anonymous destination and being matched later. It is arriving through an action that already belongs to a requested item.

The application can therefore preserve a chain such as:

May request → operating account statement → uploaded file → pending staff review

The file still needs storage. The difference is that storage is only one step inside a larger operation.

The relationship to the request should not be reconstructed from the filename after the upload finishes.

“Uploaded” should not become “complete”

Another integration decision appears when the storage provider returns success.

It is tempting to treat that response as completion:

The file exists, so the requested item is done.

For bookkeeping documents, arrival and acceptance are separate events.

The uploaded statement may cover the wrong period. The PDF may be unreadable. The client may have selected the payroll item and attached a bank statement. A report may exclude the final week of the month.

The upload service cannot make that operational decision merely because it accepted the file.

A safer progression is:

Missing → Uploaded → Pending review → Accepted

If the reviewer finds a problem, the same requested item can move to a reupload state instead of being replaced with an unrelated new request.

That keeps the correction attached to the original context:

  • what the firm requested
  • what the client submitted
  • why it was rejected
  • what replacement is still needed

The provider response confirms that the transfer worked. The application decides what the transfer means.

Reupload should continue the same conversation

A loose file drop makes replacement files harder to recognize.

Suppose a client submits Bank Statement.pdf, the team rejects it because it covers April, and the client uploads another file two days later through the same permanent link.

The new file may arrive as:

Bank Statement (1).pdf

Someone still has to connect it to the rejected May statement, verify that it is the replacement, and update the missing-document record maintained elsewhere.

A request-specific flow can keep that sequence inside the same item.

The reviewer rejects the upload and leaves a note. The client returns to the original request page. The affected item shows that another file is required. The replacement is submitted against that item rather than entering as a new loose file.

That integration detail became the main distinction in the permanent upload link vs request-specific upload link guide I published.

The two models can use similar upload controls. What differs is how much context survives the transfer.

Do not use security as a shortcut

I deliberately avoided turning this into a claim that permanent links are automatically insecure or request-specific links are automatically secure.

Those conclusions depend on the actual implementation:

  • access controls
  • token behavior
  • expiration rules
  • storage permissions
  • retention settings
  • logging
  • link-sharing practices

The useful comparison here is narrower.

A permanent link is designed primarily as a reusable destination. A request-specific link is designed as an entry point into a defined collection cycle.

Either one still needs appropriate security controls.

The request-specific model earns its extra setup by preserving workflow context, not by making every security decision automatically correct.

Decide where the sorting should happen

The choice can be reduced to one practical question:

Should the team define the upload context before the file arrives, or organize it afterward?

For occasional, ad-hoc submissions, organizing afterward may be reasonable. A permanent destination is simple, reusable, and familiar.

For recurring monthly collection, the amount of post-upload sorting grows quickly. Several clients may submit similar filenames. The same client may have multiple accounts. Uploaded documents may need review, rejection, and replacement while other requested items remain missing.

In that situation, defining the request first keeps the next action visible.

The client sees what is needed. The upload stays attached to the relevant item. Staff can review it without guessing its purpose. A rejected file can return to the same item for replacement.

The upload endpoint may be identical at the infrastructure level.

The application behavior is not.

A successful transfer should leave the team with more than a file. It should leave them with enough context to know what happens next.

Top comments (0)