nspcc-dev / send-fs-neo-org

Send.NeoFS is a simple example of integration with NeoFS network via HTTP protocol

Home Page:http://send.fs.neo.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Download and Open buttons should do different actions for text and binary

532910 opened this issue · comments

commented

image

There a get request is sent which returns the file with its name. In case we just follow the link, we see the file with the name equal to the object id.

commented

I know of course.

  1. same actions must be done in the same ways
  2. this must not be a button, but a link (though it can look as a button)

But it's not a link, why can't it be a button?

Ok, but after #23 it is a button now, because there not any links there. Right?

commented

not sure if I correctly understand what has been changed

I guess we need to update send.fs.neo.org to the current master version. @aprasolova, can you do this?

@roman-khimov done, please check

commented

nothing has changed

Well, I've deleted the previous files and uploaded the new ones. So wonderful it would be to have a commit hash on a site page, wouldn't it, @mike-petrov and @roman-khimov?

I think so, create issue. The current version is uploaded I checked. @532910, you can check

commented

nothing has changed

Now, when you click Download btn downloading process on this page, without open new tab, you check that?

commented

both do the same: open file in the current page

What's browser did you use? I don't have this behaviour.
I my case:

  • Download btn - downloading file on current page
  • Open file by link - opening file i new tab
commented

my browsers fucks Content-Disposition, but this doesn't breaks github for example:
image
download button saves file and Raw opens in the same tab

In your case, if I upload text, both button open it (download in the same tab, link in a new tab), if I upload binary -- both actions just do the same: save file.

commented

btw, what is the reason for opening a new tab?

Opening a new tab in the same way as in the previous version of sendfs. As for this issue, Download btn should be a button component without shown url, right?

As for the difference between download and open file by link, in case uploading specific files like binary/doc/docx/... it not possible to see it in browser, thats why browser download them. But it works properly for most of the cases with text files. What solution do you see?