Sorry, victorgon of course, as shown in the screenshot
The fact that this script fails for you means that the problem is not in your app, rather on the server or on the permissions for you and your app. I notice that the 403 error is for the folder not the file. Make sure that you have sharing permissions for both the file and the folder it is in. If you are sure that both the folder and the file have open permissions and that the app is trusted, then the only remaining answer is that there is a server bug. Go to the node-solid-server page on github and file an issue listing what perms you have set, what you tried, and the fact that it gave a 403.
OK, I actually got to upload the file to @uo264074 's POD. However I have some issues that I will comment here:
- The statement I execute is fc.postFile(Ā targetUrlĀ +Ā fileName,Ā this.state.route,Ā ātext/plainā);, creates the file correctly, but it adds the extension ā.txtā to the file, f.i, the file called test.json would appear in the POD as test.json.txt, and I would like to remove the ā.txtā part.
- Is there any possibility to create a folder with Everyone as a Poster, without having to do it in the solid provider itself?
Thank you for all the answers by the way, we appreciate the help a lot.
So what got it to work? Others can learn from your experience only if you tell us what finally worked.
In terms of the extension - you should probably always supply one as part of the name. You should always define the content-type correctly. For json files , that would be āapplication/jsonā.
@jeffz perhaps the same issue than I reported you yesterday?
@AdrianPerezManso fc.createFolder()
@Smag0 originally, yes - they were using PUT, but then they switched to POST and it still didnāt work. But something changed and now it works.
@AdrianPerezManso you can use solid-file-client.createFolder() to create the folder but currently AFAIK the only way to set permissions on it is using the databrowser. You could manually edit the .acl file but be very careful - a simple error in the .acl file can make the entire folder inaccessible to you and you will not be able to see or delete it.
Iām not sure but I think that the reason it didnāt work is because we were giving Submitter permissions, and not Poster permissions. So the things I had into account to make this work are the following:
- Giving all possible permissions to the application (in my case localhost)
- Giving Poster permissions for the user/group by whome you want to create the file
- Using POST method instead of PUT method to create a file in another oneās POD
I donāt know which of these requisites are totally mandatory, but at least is the configuration that made it work for us.
Using the āapplication.jsonā the file appears like these:
Can I access the proper content somehow?
I think you did not get my point. I mean that how can I see the content itself? For example this is in my personal POD:
Sure what i said is when itās on your own POD you have 5 icons near to the name of the file, but on the first, there are only two, the other can be displayed with the developer mode.
But I donāt know if other can see the content, it is a question for databrowser devs i send a ping to gitter where they mostly live
I think you might want to enable the Developer role for yourself to enable more views - check out https://github.com/solid/userguide/#role for how to apply roles to yourself.
@megoth
thatās what i thought too but it seem that it depends more of the file extension :
Iām a āDev roleā (spoggy.solid.community) and want to see victorgon.inrupt.net
You can view json files with the solid-filemanager Iāve made: https://otto-aa.github.io/solid-filemanager/?url=https://victorgon.inrupt.net/public (No need to login for public content). You should also be able to edit/copy/rename/ā¦ files with it, though Iām not 100% that everything still works as I donāt check it regularly.
@AdrianPerezManso @AnaGciaSchz & friends
this could also help you to deal with inbox Socialid
source : GitHub - scenaristeur/socialid: Solid Inbox
When logged you should be able to post to inbox of your friend but they must grant you/everyone to submitter before Solidarity - first shot for a š - #5 by Smag0
@Smag0, Iām taking a look to this application you just commented. Do you know if there is anyway to use it inside the application, without using the browser?
By the way, I will keep the āapplication/jsonā format, despite the fact it is not shown as text mode, because our application parses perfectly the content.
It can be included in any app just use the solid databrowser to grant the rights of your inbox (if you want that I can respond to you;-)
Then add me to your friends ( https://spoggy.solid.community/profile/card#me ) and you should be able to post to my solid inbox. Now Iām going to eat but I will respond to you soon afterā¦ And you should see in the app, the same message that you will find in your inbox folder. You can also try with all of your friends
I donāt know which permissions I have to give of inbox. I also already added you, and I think Iām able to send you a message, but I tried with @uo264074 and did not work. I suppose it is related with the inbox permissions
He must grant everyone to submitter, see here Solidarity - first shot for a š
Not received, not sure that it works todayā¦ But sure that It worked and this is the principle how it can work but I must investigate