Live data from Hacker News

How to copy a file between devices? (2022)

grdw.nl

351–354 of 354 posts

Re: How to copy a file between devices? (2022)

#353

For this I created a public Backblaze bucket, created a lifecycle rule that deletes files after 7 days, created an application key with write privileges but not read ones, then wrote a script that uploads an arbitrary file under a random name so only people with the name will be able to download or overwrite it. The best part is that the file is available under an HTTP direct link, not behind an obscure webpage with…

No need to give your file an obscure name, or use a public bucket. You can use a private bucket and create a presigned URL with an expiration of up to one week.

Re: How to copy a file between devices? (2022)

#354

For this I created a public Backblaze bucket, created a lifecycle rule that deletes files after 7 days, created an application key with write privileges but not read ones, then wrote a script that uploads an arbitrary file under a random name so only people with the name will be able to download or overwrite it. The best part is that the file is available under an HTTP direct link, not behind an obscure webpage with…

No need to give your file an obscure name, or use a public bucket. You can use a private bucket and create a presigned URL with an expiration of up to one week.

Presigned URLs are long and ugly and b2 requires an extra API call to generate that, so I tend to prefer not to use them. The other reason for obscure names is so that you can't download or update files that you don't know the name even if you have the upload key. I know it goes against common sense security practice but compromising convenience can mean compromising security in many cases. The thing is to make sure your scheme is rigourous.
Post reply on HN