Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants