I'm creating a json file and uploading it to the storage bucket, for some reason on the fs I see the file name as "<filename>.json.json
, although its id is <filename>.json
. Same behavior happens even when I upload a file from the console and give it the <filename>.json
id. Is there a way to control that?
What does your code look like
ID does not affect the name
It also happens from the console itself. I upload a file, set its id and see it with a wrong name on the fs
ill share the code
with a wrong name on the fs What do you mean?
let jsonFilename = `${fileName}.json`
const jsonBlob = new Blob([contentString], { type: 'application/json' });
var jsonFile = new File([jsonBlob], jsonFilename);
console.log("this json file", jsonFilename);
await api.provider().storage.createFile(
Server.storageBucket,
jsonFilename,
jsonFile
).catch(err => {
console.log("err json filename", err)
});```
and this is with the web or node sdk?
^ this is when I uploaded from the console
web sdk
I'll mention that the file security and the encryption are set to off
cloud is working fine:
this was uploaded via the console
can you tell what's on the fs itself?
I think that when tryint to upload del.json.json is the same as del.json.json. may you try to upload del1.json
?
@Steven ?
what?
Are you uploading the same file again without deleting it?
In your cloud test you've uploaded "del.json.json" which is being saved on the fs with the same name as if you were saving "del.json". As example , try to upload "test.json"
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...