Skip to content

Add first files documentation articles#76

Draft
SariSaar wants to merge 3 commits into
mainfrom
files-documentation
Draft

Add first files documentation articles#76
SariSaar wants to merge 3 commits into
mainfrom
files-documentation

Conversation

@SariSaar
Copy link
Copy Markdown
Contributor

@SariSaar SariSaar commented May 8, 2026

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dev-docs Ready Ready Preview, Comment May 11, 2026 1:22pm

Request Review

Copy link
Copy Markdown
Contributor

@shareoc shareoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven’t followed ANY of the files related conversation so far, so I’m really coming from a blank slate here. I had trouble understanding how this feature works on a high level. I started from the Files in Sharetribe article, and it dives directly into advanced concepts. As a reader, who does not know much about this feature, I would benefit from an Introduction or an architectural overview of how this feature works and what it can be used for. See this comment: https://github.com/sharetribe/dev-docs/pull/76/changes#r3209064101

I really liked the file-lifecycle article and I think it's a great approach having step-by-step API level instructions. You were considering a how-to article, but I think having more examples how interaction with the API works like the uploading a file section, would be really beneficial!

Something to consider: would the Files article work better under References > Files?

I didn't dive too deep into the Files in Sharetribe article yet, so I could review that again at some point in the future

Comment thread content/concepts/files/files-in-sharetribe/index.mdx Outdated
Comment thread content/concepts/files/files-in-sharetribe/index.mdx Outdated
Comment thread content/concepts/files/files-in-sharetribe/index.mdx
Comment thread content/concepts/files/file-lifecycle/index.mdx
Comment on lines +303 to +306
for example that it does not have malware. In addition, the backend
verifies that the file mime type is acceptable and the size is less than
1GB.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a separate section on limitations, e.g. what kind of files can be uploaded? Or is that handled in the API reference?

Copy link
Copy Markdown
Contributor Author

@SariSaar SariSaar May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template doesn't have an explicit list of allowed files, and the check is made on the API level. I would imagine that the necessary details will be available in the API reference – if that's not the case, then we can for sure amend this part.

const ownFileResource = await sdk.ownFiles.create({ ...metadata }).data;
```

This step also validates that the file mime type is supported.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What mime types are supported?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe pinging @lyyder and @walterrw on this – how closely do we want to document supported/blocked mime types? I did find the categorization in src/sharetribe/util/file_security.clj. I don't know what the security balance is in terms of documenting the categories externally, so any advice is welcome!

Comment thread content/concepts/files/file-lifecycle/index.mdx
Comment on lines +67 to +69
The actual file is uploaded directly to storage with the URL and other
details from the response, and the upload does not use Sharetribe APIs.
The SDK has another helper function to upload the file.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sounds interesting! Could this flow be elaborated in the Files in Sharetribe article? That is, explaining the interaction between the client, our APIs, and the file storage. I feel like once I made it to this sentence, I started understanding how the architecture of file uploads work

Copy link
Copy Markdown
Contributor Author

@SariSaar SariSaar May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good highlight! I added some more explanation as well as a visual for explaining this. Let me know if this still requires more elaboration!

Comment thread content/concepts/files/file-lifecycle/index.mdx Outdated
Comment thread content/concepts/files/file-lifecycle/index.mdx Outdated
@SariSaar
Copy link
Copy Markdown
Contributor Author

I haven’t followed ANY of the files related conversation so far, so I’m really coming from a blank slate here. I had trouble understanding how this feature works on a high level. I started from the Files in Sharetribe article, and it dives directly into advanced concepts. As a reader, who does not know much about this feature, I would benefit from an Introduction or an architectural overview of how this feature works and what it can be used for. See this comment: https://github.com/sharetribe/dev-docs/pull/76/changes#r3209064101

I really liked the file-lifecycle article and I think it's a great approach having step-by-step API level instructions. You were considering a how-to article, but I think having more examples how interaction with the API works like the uploading a file section, would be really beneficial!

Something to consider: would the Files article work better under References > Files?

I didn't dive too deep into the Files in Sharetribe article yet, so I could review that again at some point in the future

Excellent points! I'll review the beginning of the Files in Sharetribe article from this point of view – I notice I was wary about potentially having overlap with no-code Help center content, but I guess there's still a middle ground between the two extremes.

As for the Files reference, I believe that's coming from Core side, though I'll need to double check that still. I think that the reference article will go fairly deeper still into the technical details, so once that exists we can then aim the Files in Sharetribe article between Help center and reference in terms of technical vs explanatory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants