Skip to content

fix: allow files with # to be uploaded, show upload confirmation#3664

Merged
tefkah merged 3 commits into
mainfrom
tfk/upload-issues
Jul 13, 2026
Merged

fix: allow files with # to be uploaded, show upload confirmation#3664
tefkah merged 3 commits into
mainfrom
tfk/upload-issues

Conversation

@tefkah

@tefkah tefkah commented Jul 9, 2026

Copy link
Copy Markdown
Member

Issue(s) Resolved

Files with a # in their name couldnt be uploaded.
Also when you uploaded a file during the submission workflow it wouldnt show confirmation you succeeded.

Test Plan

Screenshots (if applicable)

Optional

Notes/Context/Gotchas

Supporting Docs

Copilot AI left a comment

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Comments suppressed due to low confidence (1)

client/utils/upload.ts:77

  • Only rawFileName is sanitized, but fileExtension can still contain URL-reserved characters (e.g. image.jpg#2 yields fileExtension === "jpg#2"). That reintroduces the same #/fragment issue in both the S3 key and verification/download URLs. Consider sanitizing the extension (or encoding the URL when verifying/downloading).
	const fileName = rawFileName.replace(/[^a-zA-Z0-9\-_.]+/g, '_');
	const random = Math.floor(Math.random() * 8);
	const now = new Date().getTime();
	const pubSegment = pubId ? `/p${pubId}` : '';
	return `${testPrefix}c${communityId}${pubSegment}/u${userId}/${fileName}-${random}${now}.${fileExtension}`;

Comment on lines 31 to +35
if (files.length) {
s3Upload(files[0], this.onUploadProgress, this.onUploadFinish, 0);
s3Upload(files[0], this.onUploadProgress, this.onUploadFinish, 0, this.onUploadError);
this.setState({
isUploading: true,
progress: 0,
Comment on lines 31 to +35
if (files.length) {
s3Upload(files[0], this.onUploadProgress, this.onUploadFinish, 0);
s3Upload(files[0], this.onUploadProgress, this.onUploadFinish, 0, this.onUploadError);
this.setState({
isUploading: true,
progress: 0,
Comment thread client/components/FormattingBar/media/MediaAudio.tsx
Comment thread client/utils/upload.ts
Comment on lines +35 to +39
s3Upload(files[0], this.onUploadProgress, this.onUploadFinish, 0, this.onUploadError);
this.setState({
isUploading: true,
progress: 0,
uploadError: null,
Comment thread client/components/FileUploadButton/FileUploadButton.tsx
@tefkah tefkah merged commit 61aba1c into main Jul 13, 2026
1 of 2 checks passed
@tefkah tefkah deleted the tfk/upload-issues branch July 13, 2026 14:30
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