django-downloadview icon indicating copy to clipboard operation
django-downloadview copied to clipboard

StorageDownloadView download without end of line symbols

Open Radren opened this issue 9 years ago • 4 comments

Trying to download file from server, but it is downloaded without EOL symbols (initial file has EOL symbols - '\n'), I obtain file with one continuous string.

How can I download files with EOL characters?

Radren avatar Mar 31 '15 10:03 Radren

@Radren: just seen the issue and it is closed already... did you find a solution? Is there something we can add (in documentation, in API, ...) to make things clear about this question?

In other words, how can we improve django-downloadview for the next ones who come with the same question?

benoitbryon avatar Mar 31 '15 13:03 benoitbryon

Hello,

sorry Im noob in programming. In my txt files I use '\n' character to mark end of line. When I download file by django-downloadview it does not understand '\n' EOL character. I change it to '\r\n' and it starts work.

May be it will be userfull for someone else to say explicite in documentation that EOL is '\r\n'.

Вторник, 31 марта 2015, 6:57 -07:00 от Benoît Bryon [email protected]:

@Radren : just seen the issue and it is closed already... did you find a solution? Is there something we can add (in documentation, in API, ...) to make things clear about this question? In other words, how can we improve django-downloadview for the next ones who come with the same question? — Reply to this email directly or view it on GitHub .

Radren avatar Apr 01 '15 07:04 Radren

I think it is a bug if django-downloadview strip \n from the file.

Natim avatar Apr 01 '15 07:04 Natim

I think it is a bug if django-downloadview strip \n from the file.

Agreed.

Perhaps something related to binary VS text mode when we open files. I have no other idea at the moment.

benoitbryon avatar Apr 01 '15 08:04 benoitbryon