After many months of work, @bourgeoa, @A_A , and I are releasing version 1.0.0 of Solid-File-Client. This library of methods to manage Solid files and folders now has the ability to copy or move entire folder trees from one pod to another or back and forth between a pod and a local file system. It supports both text and binary files and works in either a browser or node/console context. Also new in this version is extensive support for linked resources (.acl and .meta files). By default linked resources are copied, moved, and deleted with their associated resource, but options allow you to adjust that behavior as well as to discover the location of linked resources.
There are a number of changes which are not backward compatible. Users of the old version of Solid-File-Client should see Transitioning to Version 1.x.
Here is a complete working node script to upload and download images to and from your current local working directory. Also take a look at the Browser Upload Demo which allows you upload to your pod without even having to install Solid-File-Client.
If you have questions, feel free to ask in the forum or on gitter. For bug reports or feature suggestions, please use github issues and PRs. If you don’t know how to do that, ask!
I just tried the Browser upload, but it does not work
Login button does nothing
Errors occur in the browser console:
index.js:3 Uncaught ReferenceError: require is not defined
at index.js:3
(anonymous) @ index.js:3
index.min.js:7 Uncaught SyntaxError: Cannot use import statement outside a module
(index):133 Uncaught ReferenceError: SolidFileClient is not defined
at (index):133
(anonymous) @ (index):133
I can not reproduce your .acl problem. I created a folder on my local system, added a single .acl file there (a copy of my public folder’s .acl), copied the folder to my pod using the same command you did and it worked fine. I then recopied over the now-existing folder on the pod and it still worked fine. What was the command which produced the error you showed (Don’t know how to parse text/plain)?
I could not reproduce it in a clean setup either and thereby found out, that I had no explicit installation of solid-auth-cli in my project. After installing this, it works now.
b [SFCFetchError]: SFCFetchError Cannot read property 'endsWith' of undefined
at toFetchError (/path/to/projet/node_modules/solid-file-client/dist/node/solid-file-client.bundle.js:8:66451)
at /path/to/projet/node_modules/solid-file-client/dist/node/solid-file-client.bundle.js:8:68384
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async $.copyLinksForItem (/path/to/projet/node_modules/solid-file-client/dist/node/solid-file-client.bundle.js:8:71869)
at async $.copyFile (/path/to/projet/node_modules/solid-file-client/dist/node/solid-file-client.bundle.js:8:70853)
at async run (/path/to/projet/upload.js:10:9) {
name: 'SFCFetchError',
successful: [],
rejected: [],
rejectedErrors: [],
errors: [
TypeError: Cannot read property 'endsWith' of undefined
at $.copyFile (/path/to/projet/node_modules/solid-file-client/dist/node/solid-file-client.bundle.js:8:70642)
at $.copyMetaFileForItem (/path/to/projet/node_modules/solid-file-client/dist/node/solid-file-client.bundle.js:8:71019)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async $.copyLinksForItem (/path/to/projet/node_modules/solid-file-client/dist/node/solid-file-client.bundle.js:8:71869)
at async $.copyFile (/path/to/projet/node_modules/solid-file-client/dist/node/solid-file-client.bundle.js:8:70853)
at async run (/path/to/projet/upload.js:10:9)
],
ok: false,
message: "SFCFetchError Cannot read property 'endsWith' of undefined",
status: -1,
statusText: "SFCFetchError Cannot read property 'endsWith' of undefined"
}
The actual upload process did work nevertheless. Seems to be a follow up error.
I’ll keep looking for this although it’s cosmetic. If (or should I say when) you find other things, would you mind submitting an issue rather than posting here - makes it much easier for me to track and follow up.
Yes of course, I just wanted to make sure its a real issue. Will use github from now on.
I think its not just cosmetic, because it throws an exception and will break the regular code flow, i.e. anything that relys on successful copy operation will not execute, though it actually was kind of successful