We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 84020c1 + 3820206 commit 712cc35Copy full SHA for 712cc35
1 file changed
playground/src/layout/main-layout.js
@@ -59,11 +59,13 @@ const MainLayout = ({children, ...rest}) => {
59
attributes: attributes,
60
scenarios: scenarios
61
})
62
- const file = new File([yamlString], `s.yaml`, {type: 'text/x-yaml'});
63
- put("s.yaml", file, {
+ // Generate unique filename to avoid conflicts
+ const uniqueId = `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
64
+ const fileName = `${uniqueId}.yaml`;
65
+ const file = new File([yamlString], fileName, {type: 'text/x-yaml'});
66
+ put(fileName, file, {
67
access: 'public',
- token: process.env.REACT_APP_BLOB_READ_WRITE_TOKEN,
- addRandomSuffix: true
68
+ token: process.env.REACT_APP_BLOB_READ_WRITE_TOKEN
69
}).then((result) => {
70
let fileName = result.url.split('/').pop();
71
setId(fileName.replace('.yaml', ''))
0 commit comments