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

Uploading a pdf with new 1.5 api loses file extension / suffix #253

Open
bsdz opened this issue Jul 17, 2022 · 1 comment
Open

Uploading a pdf with new 1.5 api loses file extension / suffix #253

bsdz opened this issue Jul 17, 2022 · 1 comment

Comments

@bsdz
Copy link

bsdz commented Jul 17, 2022

When I upload a file with ".pdf" (or ".epub") extension with rmapi's put command it uploads sucessfully but drops the suffix on the server. E.g.

me@myhost:/tmp/rmapi$ ls -l
total 4488
-rw-rw-r-- 1 me me 3281197 Jul 17 20:53 sample.epub
-rw-rw-r-- 1 me me 1309513 Jul 17 20:48 sample.pdf
me@myhost:/tmp/rmapi$ rmapi put ./sample.pdf /
Refreshing tree...
WARNING!!!
  Using the new 1.5 sync, this has not been fully tested yet!!!
  Make sure you have a backup, in case there is a bug that could cause data loss!
uploading: [./sample.pdf]...OK
me@myhost:/tmp/rmapi$ rmapi ls /
Refreshing tree...
WARNING!!!
  Using the new 1.5 sync, this has not been fully tested yet!!!
  Make sure you have a backup, in case there is a bug that could cause data loss!
[f]	Quick sheets
[f]	sample
[f]	existing.pdf

This also means one can't upload two docs with same base name, one being epub and the other being pdf. i.e.

me@myhost:/tmp/rmapi$ rmapi put ./sample.epub /
Refreshing tree...
WARNING!!!
  Using the new 1.5 sync, this has not been fully tested yet!!!
  Make sure you have a backup, in case there is a bug that could cause data loss!
ERROR: 2022/07/17 20:55:40 main.go:19: Error:  entry already exists

edit: I've realised there's a workaround which is to rename the file on the server using the "mv" command.

@ddvk
Copy link
Collaborator

ddvk commented Oct 8, 2022

I think that is the default behavior by the official apps (extensions get removed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants