@stoker-platform/web-app 0.5.142 → 0.5.143

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.143
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: fix renaming files created by a different user
8
+
3
9
  ## 0.5.142
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.142",
3
+ "version": "0.5.143",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
package/src/Files.tsx CHANGED
@@ -892,8 +892,15 @@ export const RecordFiles = ({ collection, record }: FilesProps) => {
892
892
  return
893
893
  }
894
894
 
895
+ if (!currentUser?.uid) return
895
896
  const newRef = ref(storage, newPath)
896
- await uploadBytesResumable(newRef, uploadContent, { customMetadata: metadata.customMetadata })
897
+ await uploadBytesResumable(newRef, uploadContent, {
898
+ contentType: metadata.contentType,
899
+ customMetadata: {
900
+ ...metadata.customMetadata,
901
+ createdBy: currentUser?.uid,
902
+ },
903
+ })
897
904
 
898
905
  await deleteObject(originalRef)
899
906