Unable to download Storj file with whitespace in the filename

Moderator: Project members

Post Reply
Message
Author
test
150 Opening data channel
Posts: 55
Joined: 2020-03-24 06:36

Unable to download Storj file with whitespace in the filename

#1 Post by test » 2020-05-13 07:33

Hi!

I am able to upload/download a file with whitespace in its name from SFTP sever using FileZIlla

I am able to upload such files to Storj

But, I am unable to download such files from Storj.

Suppose the remote file name, which I want to download, is A B C.txt

Now, when I try to download this file, the Status bar displays the following messages:

Code: Select all

Status:      	Connecting to .......
Status:      	Retrieving directory listing of "/"...
Status:      	Directory listing of "/" successful
Status:      	Retrieving directory listing of "/directory123"...
Status:      	Directory listing of "/directory123" successful
Status:      	Starting download of /directory123/A B C.txt
Command:	get directory123 A "/Volumes/Machintosh/Users/apple/Desktop/A B C.txt"
Error:        	download starting failed: uplink: object not found ("A")
Error:        	File transfer failed
Error:        	Unknown eventType 217
Status:      	Disconnected from server
On checking with https://svn.filezilla-project.org/svn/F ... zstorj.cpp, I myself added the following 3 lines to else if (command == "get") { condition in /src/storj/fzstorj.cpp file:

Code: Select all

fzprintf(storjEvent::Status, "Bucket: %s", bucket);
fzprintf(storjEvent::Status, "ID: %s", id);
fzprintf(storjEvent::Status, "File: %s", file);
Now, when I retry downloading the file A B C.txt, the Status bar displays the following messages:

Code: Select all

Status:      	Connecting to .......
Status:      	Retrieving directory listing of "/"...
Status:      	Directory listing of "/" successful
Status:      	Retrieving directory listing of "/directory123"...
Status:      	Directory listing of "/directory123" successful
Status:      	Starting download of /directory123/A B C.txt
Command:	get directory123 A "/Volumes/Machintosh/Users/apple/Desktop/A B C.txt"
Status:		Bucket: directory123
Status:		ID: A
Status:		File: /Volumes/Machintosh/Users/apple/Desktop/A B C.txt
Error:        	download starting failed: uplink: object not found ("A")
Error:        	File transfer failed
Error:        	Unknown eventType 217
Status:      	Disconnected from server
Basically, the reason is because full file name is not obtained in these lines:

Code: Select all

get directory123 A "/Volumes/Machintosh/Users/apple/Desktop/A B C.txt"

Code: Select all

ID: A

Code: Select all

download starting failed: uplink: object not found ("A")
But, all these parameters (bucket name, ID and file name) are obtained from arg string.
I am unable to resolve this.

Kindly help

User avatar
botg
Site Admin
Posts: 35492
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Unable to download Storj file with whitespace in the filename

#2 Post by botg » 2020-05-13 08:16

The old version used file IDs, not file names to download files.

Does the new implementation still use file IDs? If it does not use IDs, you need to get rid of all the ID handling and ID resolving code from the Storj implementation, not just in the stub, but also the engine part.

test
150 Opening data channel
Posts: 55
Joined: 2020-03-24 06:36

Re: Unable to download Storj file with whitespace in the filename

#3 Post by test » 2020-05-13 08:29

Have compared both the old fzstorj.cpp (https://svn.filezilla-project.org/svn/F ... zstorj.cpp) as well as the latest fzstorj.cpp (https://svn.filezilla-project.org/svn/F ... zstorj.cpp).

The else if (command == "get") { part of the code seems to be same for both of these versions.

User avatar
botg
Site Admin
Posts: 35492
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Unable to download Storj file with whitespace in the filename

#4 Post by botg » 2020-05-13 08:58

The new implementation is what you are currently working on.

test
150 Opening data channel
Posts: 55
Joined: 2020-03-24 06:36

Re: Unable to download Storj file with whitespace in the filename

#5 Post by test » 2020-05-14 18:01

I realised that the same error also comes while deleting a file with whitespace in its name.

So, edited the following files:
i) /src/storj/fzstorj.cpp
ii) /src/engine/storj/delete.cpp
iii) /src/engine/storj/file_transfer.cpp

Now, it is working fine.
Thanks

Post Reply