Skip to content

Commit 4826075

Browse files
committed
adding timestamp
1 parent 8d1a997 commit 4826075

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/react-native/src/services/template.ts.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ export class {{ service.name | caseUcfirst }} extends Service {
128128
{% endif %}
129129
{% endfor %}
130130

131+
let timestamp = new Date().getTime();
131132
while (offset < size) {
132133
let end = Math.min(offset + Service.CHUNK_SIZE - 1, size - 1);
133134

@@ -143,7 +144,7 @@ export class {{ service.name | caseUcfirst }} extends Service {
143144
});
144145
var path = `data:${{'{'}}{{ parameter.name | caseCamel | escapeKeyword }}.type{{'}'}};base64,${{'{'}}chunk{{'}'}}`;
145146
if (Device.osName === 'Android') {
146-
path = FileSystem.cacheDirectory + '/tmp_chunk';
147+
path = FileSystem.cacheDirectory + '/tmp_chunk_' + timestamp;
147148
await FileSystem.writeAsStringAsync(path, chunk, {encoding: FileSystem.EncodingType.Base64});
148149
}
149150

0 commit comments

Comments
 (0)