Answer the question
In order to leave comments, you need to log in
Can I store static files for a website on Dropbox?
I have about 1TB of static files (DOC, PPT, PDF, XLS). I also have a website where each file has its own page where it can be downloaded.
Now the link to the files goes to third-party services. And this is bad, because some of the sites periodically fall off.
Therefore, I want to store these files on my own, but not on the server (I have linode.com), but on cloud sites like dropbox, gdrive, onedrive. Actually the question is whether it is possible to upload 1tb of files and get static links to them from the service. Because it is corny cheaper, 1TB of space on the same Dropbox costs $10, and a server with this size will cost $40.
Answer the question
In order to leave comments, you need to log in
Made. It turned out to be necessary to use the API.
1) Created Core API App.
2) Generated a token.
3) Download PHP SDK .
All.
Working example:
<?php
require_once "dropbox-sdk/lib/Dropbox/autoload.php";
use \Dropbox as dbx;
$accessToken = '%accessToken%'; // Здесь вставить сгенерированный токен
$dbxClient = new dbx\Client($accessToken, "PHP-Example/1.0");
print_r($dbxClient->createTemporaryDirectLink('/your_file.txt')); // Полный путь до файла
Do you mean get a direct link to the file? Or to the Dropbox page where you can download/save the file? If the second - no problem. You can experiment with a free account, a paid one will work the same, only the total space and allowed traffic will be increased. Well, a little more advanced options for publishing files for public access.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question