FileName := 'AzureSharedFile.txt';
CreateFileNew(FileName);
WriteText2File(FileName, 'This is a test !!!!');
Regards
Hi @ftornero I have tried your way and it works fine, but when I tried to write in a file that is not created by your code(means uploaded/created manually) then it's showing an exception "The range specified is invalid for the current size of the resource."
I have looked into this exception and found that when we create/upload a file manually then its length is fixed which is not changeable. https://github.com/Azure/azure-sdk-for-java/issues/14961
Do you have a workaround for this, because my requirements are a bit different, my user/client will create the file and I have to write/update in that file.
Best Regards
Abdullah
I don't test this issue but maybe the solution would be to read the file, delete it and create a new one with the same name and the correct content.
Regards.
Thanks, @ftornero,
I have tried different methods,
1st is: If I upload the file with a size greater than 1kb then it allows us to write,
2nd: The approach you have followed, first create the file, and then it allows us to write in it, most probably(not sure) due to this header value
Answers
Hi @ftornero I have tried your way and it works fine, but when I tried to write in a file that is not created by your code(means uploaded/created manually) then it's showing an exception "The range specified is invalid for the current size of the resource."
I have looked into this exception and found that when we create/upload a file manually then its length is fixed which is not changeable.
https://github.com/Azure/azure-sdk-for-java/issues/14961
Do you have a workaround for this, because my requirements are a bit different, my user/client will create the file and I have to write/update in that file.
Best Regards
Abdullah
I don't test this issue but maybe the solution would be to read the file, delete it and create a new one with the same name and the correct content.
Regards.
Thanks, @ftornero,
I have tried different methods,
1st is: If I upload the file with a size greater than 1kb then it allows us to write,
2nd: The approach you have followed, first create the file, and then it allows us to write in it, most probably(not sure) due to this header value .
Regards.