Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum attachment size for Dropbox sync #9106

Open
ferrouswheel opened this issue Oct 21, 2023 · 7 comments
Open

Maximum attachment size for Dropbox sync #9106

ferrouswheel opened this issue Oct 21, 2023 · 7 comments
Labels
bug It's a bug medium Medium priority issues sync sync related issue

Comments

@ferrouswheel
Copy link

ferrouswheel commented Oct 21, 2023

I have some PDF files of around 150MB as attachments to Joplin notes that won't sync. This is an import from Evernote and 40k other notes and attachments have synced without issue.

These PDFs repeatedly and consistently fail to sync via Dropbox.

I have encryption enabled, so as I understand it, the actual size of the encrypted files is larger.

The error on the sync page is:

eye_opener_tog_paper_highres.pdf (d71a39a688ba48fc94c8d265376a0ab3) could not be uploaded: network timeout at: https://content.dropboxapi.com/2/files/upload

This Dropbox forum post suggests that 150MB is the official limit for the endpoint being called:

https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/API-V2-Upload-File-size-above-300MB/td-p/389687

and suggests using the upload sessions API instead.

I have not looked at Joplin source code, but initial thoughts are:

  • Does Joplin use upload sessions API for large files?
  • If so, is it choosing which upload API to use based on the attachment size before encryption instead of after?

Environment

Joplin version: Joplin 2.12.18 (prod, win32)
Platform: Windows

Steps to reproduce

  1. Enable encryption
  2. Download the paper PDF from https://www3.cs.stonybrook.edu/~cvl/content/eyeopener/eyeopener.html
  3. Attach to note
  4. Sync to Dropbox and you should get an error like:

eye_opener_tog_paper_highres.pdf (d71a39a688ba48fc94c8d265376a0ab3) could not be uploaded: network timeout at: https://content.dropboxapi.com/2/files/upload

Describe what you expected to happen

Successful sync without error

@ferrouswheel ferrouswheel added the bug It's a bug label Oct 21, 2023
@personalizedrefrigerator
Copy link
Collaborator

personalizedrefrigerator commented Oct 24, 2023

Thank you for reporting this (and for linking to a forum post with a possible solution)!

I don't think that Joplin does use the upload sessions API.

These seem to be the relevant parts of Joplin's source code:

const endPointFormat = ['files/upload', 'files/download'].indexOf(path) >= 0 ? 'content' : 'api';

Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Nov 23, 2023
@personalizedrefrigerator
Copy link
Collaborator

Still an issue!

@github-actions github-actions bot removed the stale An issue that hasn't been active for a while... label Nov 24, 2023
Copy link
Contributor

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

@github-actions github-actions bot added the stale An issue that hasn't been active for a while... label Dec 24, 2023
@personalizedrefrigerator personalizedrefrigerator added sync sync related issue medium Medium priority issues and removed stale An issue that hasn't been active for a while... labels Dec 24, 2023
@7adidaz
Copy link

7adidaz commented Mar 17, 2024

I can work on this, I need some verification on my approach to this before I miss things up:)

  1. calculate how many "150 MB" in the file.
  2. create an /upload_session/start and get a session_id.
  3. for that many ("150 MB" -1) in a file, use /upload_session/append with the session_id.
  4. for the last "150 MB", call /upload_session/finish

and voila!

@ferrouswheel
Copy link
Author

@7adidaz I'm not a contributor to Joplin, so someone else will have to provide implementation guidance.

However, to avoid a potential bug, I imagine you'll need to ensure you check the file size after encryption has taken place (if the user has encryption enabled).

@7adidaz
Copy link

7adidaz commented Mar 17, 2024

ah yes, there will be a hash comparison to ensure data integrity.

7adidaz pushed a commit to 7adidaz/joplin that referenced this issue Mar 20, 2024
7adidaz pushed a commit to 7adidaz/joplin that referenced this issue Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug medium Medium priority issues sync sync related issue
Projects
None yet
Development

No branches or pull requests

3 participants