Using Tardigrade for hosting web assets on a consistent URL

I have a client who is an academic publisher, and as a consequence has thousands of fairly large PDFs representing articles in the various journals that they publish.

Currently, they’ve been hosting everything on the same server, but are now hitting disk space limits and so have asked me to look at alternatives. They’re on AWS and so one option is S3 storage - however, I’d like the chance to push them towards using Tardigrade for this instead.

I’ve got the basic mechanics working in terms of file upload & can see that we can use access rules to get a publicly accessible URL i.e.

https://link.tardigradeshare.io/14qbkJAG9GCWcEHXpvpeez2uYXpbMShhRTQRwrDwydy5QoixZTjw7B4CidTcvnanJ15ewU8XfFBqss7B7moYHLZgiPf4Nh7nrNVUMUESYRXg95bSJ13hKYo8Tf9omGn1t8mQXi5uJNe4q1grC1uXtJPJsgBFtUouka4tueV5bdaVBndSJgigMVFRQGE1eb48ZqTEA9vYiXVBy2gGF8fqfrcrYMN1bXqJ6uaS5E37CMQFyy8AZaQC1EfTo2QSnXSCSNwy4MeGBUMYhUTQ9g4ZVK9oFbZiJ6yv84sS8gfcFpcBu6TSfuu73jrwNLQ52xk1HW2sMwnTFPT6vqCD5qLhDP7Xk98zvBhEMhKTgJRtaydQj2kSDLcKa3aFNCTEEre8WLwfnWFiTgxTz8imbMaJorHh7g1YvvELjYGxZAP9xryRj1aVZcdBE1wfUkR4SDEjBZRvTG8NNwNjsbDdPxUjQgJwgFPLCp4rDEGZMTSi9gbgB4QYpBhDhU8gdntFip/journal-test/test-journal-pdf2.pdf

However, the path between the domain and the bucket name seems to constantly change from file to file which means there’s no easy way of being able to update the site so that /uploads/test-journal-pdf.pdf becomes something based on Tardigrade.

Is there any easy way of knowing what the access URL will be without having to individually create an access request for every single one of thousands of PDFs, and storing these in a DB somewhere? Ideally, a consistent URL that will access a specific bucket is what I’m looking for.

Apologies if this has been covered elsewhere, but I have searched the forum and can’t find anything.

PS: I know another potential options is to mount the bucket on the server (I’ve seen mention of this, but again no guidelines) but this is not ideal because we’ll then be paying bandwidth twice - for Tardigrade, and for downloading from the AWS server. I’d rather go direct if possible

Thanks!

1 Like

@believe Welcome to the Tardigrade community!

You can share not only a specific file, but also a folder in a bucket, the whole bucket, or even your entire project.

For example, you can share the journal-test bucket for readonly access with:

uplink share --readonly sj://journal-test

The generated access grant will be good for all files within this bucket.

3 Likes

Ah perfect - that’s exactly what I was looking for.

Sorry, the walkthrough seemed to suggest sharing needed to be done file by file, which is what threw me off track. Appreciate the quick response :slight_smile:

1 Like

Also, if you don’t want to use the Tardigrade linksharing service but your own domain, you may want to check how to run the S3 Gateway as a static website: https://documentation.tardigrade.io/api-reference/s3-gateway#running-the-gateway-to-host-a-static-website

1 Like

Thanks for the suggestion - had another thought on this, which i’ve just added to the features section.

I think the drawback of doing it this way is paying double for bandwidth (unless I’ve misunderstood) - particularly given the bandwidth from the AWS server costs more

It really depends on the use case and where you host the S3 Gateway. If you host it on a service with cheap bandwidth cost that would not be such a problem.

Yeah, we’re tied to AWS for this project but I’ll definitely bear that in mind for future projects, thanks