Im currently trying to create a share links for a pdf file that was just uploaded through my App while using the Dropbox Core API.
The code is below:
request.post('https://api.dropboxapi.com/1/shares/auto/proposals/'+name+'?short_url=false',{
headers: { Authorization: 'Bearer TOKEN HERE', 'Content-Type': 'application/pdf'
},body:content}, function optionalCallback (err, httpResponse, bodymsg) {
if (err) {
console.log(err);
}else{
console.log('Shared link ' + JSON.stringify(httpResponse));
}
});
Points to note:
- The PDF file size is 11MB, I can successfully and easily upload the file to dropbox using the API.
- The issue only arises when I try to create a share link for the recently uploaded 11MB file.
- Also note I am using Node.JS to upload & create share links.
The Error:
The error I get is HTTP Error 413, which based on my research means "Request entity too large"
Below is an image of the error, its not the whole image as the error was too long:
The maximum file size for uploading through the API is 150MB and my file is way below the line. Is there a separate file size for generating share links?
Note
I have tested small files of size 1MB to 2MB and was successfully able to generate a share link, issue arises with large files i.e (11MB)