Skip to content

Commit 39768a0

Browse files
Update src/pages/learn/file-uploads.mdx
Co-authored-by: Benjie <[email protected]>
1 parent fcbfc58 commit 39768a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pages/learn/file-uploads.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ The most secure and scalable approach is to avoid uploading files through GraphQ
6363

6464
1. Use a GraphQL mutation to request a signed upload URL from your storage provider (e.g., Amazon S3).
6565
2. Upload the file directly from the client using that URL.
66-
3. Submit a second mutation to associate the uploaded file with your application’s data.
66+
3. Submit a second mutation to associate the uploaded file with your application’s data (or use an automatically triggered process, such as Amazon Lambda, to do the same).
67+
68+
You should ensure that these file uploads are only retained for a short period such that an attacker completing only steps 1 and 2 will not exhaust your storage.
69+
When processing the file upload (step 3), the file should be moved to more permanent storage as appropriate.
6770

6871
This separates responsibilities cleanly, protects your server from binary data handling, and aligns with best practices for
6972
modern web architecture.

0 commit comments

Comments
 (0)