forked from Qortal/qortal
Use a filename without an extension when publishing data from a string (instead of .tmp)
This commit is contained in:
parent
1f7fec6251
commit
9f30571b12
@ -1128,7 +1128,7 @@ public class ArbitraryResource {
|
|||||||
if (path == null) {
|
if (path == null) {
|
||||||
// See if we have a string instead
|
// See if we have a string instead
|
||||||
if (string != null) {
|
if (string != null) {
|
||||||
File tempFile = File.createTempFile("qortal-", ".tmp");
|
File tempFile = File.createTempFile("qortal-", "");
|
||||||
tempFile.deleteOnExit();
|
tempFile.deleteOnExit();
|
||||||
BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile.toPath().toString()));
|
BufferedWriter writer = new BufferedWriter(new FileWriter(tempFile.toPath().toString()));
|
||||||
writer.write(string);
|
writer.write(string);
|
||||||
@ -1138,7 +1138,7 @@ public class ArbitraryResource {
|
|||||||
}
|
}
|
||||||
// ... or base64 encoded raw data
|
// ... or base64 encoded raw data
|
||||||
else if (base64 != null) {
|
else if (base64 != null) {
|
||||||
File tempFile = File.createTempFile("qortal-", ".tmp");
|
File tempFile = File.createTempFile("qortal-", "");
|
||||||
tempFile.deleteOnExit();
|
tempFile.deleteOnExit();
|
||||||
Files.write(tempFile.toPath(), Base64.decode(base64));
|
Files.write(tempFile.toPath(), Base64.decode(base64));
|
||||||
path = tempFile.toPath().toString();
|
path = tempFile.toPath().toString();
|
||||||
|
Loading…
Reference in New Issue
Block a user