I shared a bucket via the CLI to a URL but all the folders in the bucket are empty. How can I show the files inside the folder.
uplink share sj://datasets/ --url --readonly --base-url=https://link.eu1.storjshare.io
datasets | Storj DCS (storjshare.io)
Welcome to the forum!
You should use exactly the same encryption phrase you had used during upload, otherwise objects cannot be decrypted with a different encryption phrase and buckets will look as if they are empty.
You will be asked for the encryption phrase every time you refresh the window. This is because we do not store your encryption phrase anywhere to protect your security. Please enter your encryption phrase in the tab “Enter your own passphrase”
If you lost your previous encryption phrase, then you can only delete these objects in encrypted form or delete the entire bucket. Please note that even if you lost your encryption phrase and did not save the access grant, you can still remove buckets by following these instructions:
- In your dashboard, navigate to Buckets
- Click on three vertical dots on the right side of the bucket
- Select Delete, confirm deletion
Alternately, using Uplink CLI:
- Create an access grant
Setup an uplink with that access grant. To overwrite an existing access you can add
--overwrite option to the
uplink import command.
To list buckets:
To list objects which uses the current encryption phrase:
uplink ls sj://my-bucket
If the list of objects is empty - there are no objects with the current encryption phrase. If you lost the previous encryption passphrase, you can only delete the previous objects or even the buckets.
To list objects in encrypted form:
uplink ls --encrypted sj://my-bucket
To remove object in encrypted form:
uplink rm --encrypted sj://my-bucket/An1LhSLauz-ROF8oLgLV1UrafXZVUm3HEtU8irR8il4oFI9Xqzc=
To remove buckets where you lost an encryption phrase:
uplink rb --force sj://my-bucket
Thanks for your prompt response.
So as understood, I cannot share encrypted buckets via URL, only plan data is shared. Am I right?
If so, is there a method to convert the bucket from encrypted to non-encrypted without deleting the bucket and reuploading its objects?
Please refer to Linksharing Service | Storj Docs to learn how link sharing works. You can share encrypted files using this service, and you can also Host a Static Website with the Uplink CLI and Linksharing Service | Storj Docs
Also please consult Access Grants | Storj Docs for more details about Access Management.
I did read these links and followed the instructions, but all folders in the bucket are empty. A screenshot of the folder contents is shown below.
Can you see something in these folders via uplink?
uplink ls sj://datasets/UCI_HAR_Dataset/
Yes, I can see these objects:
I tried to replicate this but unfortunately could not.
Here are the steps I took:
ACCESS_GRANT in environment from a grant generated in Storj DCS dashboard. I used an environment variable here for testing purposes.
uplink mb --access "$ACCESS_GRANT" sj://test-files
uplink cp --access "$ACCESS_GRANT" ./pexels-pixabay-220072.jpg sj://test-files/pictures1/
uplink cp --access "$ACCESS_GRANT" ./pexels-pixabay-220072.jpg sj://test-files/pictures2/
uplink share --access "$ACCESS_GRANT" sj://test-files/ --url --readonly --base-url=https://link.eu1.storjshare.io
I also verified the files are showing using uplink:
uplink ls --access "$ACCESS_GRANT" sj://test-files/pictures1/
uplink ls --access "$ACCESS_GRANT" sj://test-files/pictures2/
The resulting share URL is test-files | Storj DCS, and both the
pictures1 folders show the single image I uploaded to each.
I also created another access grant and set some files to the same bucket using that grant, and it was only able to see the files it had created: https://link.eu1.storjshare.io/s/jws73q3zkov6xkokepdk647v35ka/test-files/
Perhaps you could share the uplink version you’re using, and the steps you took to generate your access grant? If you follow the same steps I took on a completely new path in the bucket, or a brand new bucket, does it work for you?
I’m intrigued by this 0 byte nameless file in the folder:
Can it be removed?
Thanks sean, this procedure resolved my problem.
Maybe the reason for that response was that I was using different tools and with different credentials to upload and share the files. This was resolved when I only used the CLI.
One more question, can the files be downloaded directly without showing the download button.
/s/ in the URL to
/raw/ or use parameter
?wrap=0 at the end of the URL