Skip to content

Add functions to get temporary URLs for files #1780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chimnayajith
Copy link
Contributor

@chimnayajith chimnayajith commented Aug 2, 2025

Implement getFileTemporaryUrl and tryGetFileTemporaryUrl to access user-uploaded files without requiring authentication. The temporary URLs remain valid for 60 seconds and provide a secure way to share files without exposing API keys.

This uses the GET /user_uploads/{realm_id}/{filename} endpoint that returns a URL allowing immediate access without requiring authentication.

Requested in #1144 (comment)

Will be needed for #42 and #43

Implement `getFileTemporaryUrl` and `tryGetFileTemporaryUrl` to access
user-uploaded files without requiring authentication. The temporary URLs
remain valid for 60 seconds and provide a secure way to share files
without exposing API keys.

This uses the GET `/user_uploads/{realm_id}/{filename}` endpoint that
returns a URL allowing immediate access without requiring authentication.

Requested in zulip#1144 (comment)
@gnprice
Copy link
Member

gnprice commented Aug 3, 2025

Cool. This will also be the main ingredient in fixing #1732, which is an issue in our upcoming milestone M6.

(I haven't yet looked at this implementation at all.)

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