-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
New from URL doesn't consider filename (from "Content-Disposition" header) #1198
Comments
i have it reproduce.. it´s the same at the PC it would download a text file. at owncloud dl.php |
Sounds like a good opportunity for a junior job. This needs to be done in: https://github.com/owncloud/core/blob/master/apps/files/ajax/newfile.php To get the Content-Disposition header, we'll need to switch over to using cURL to download the file. |
Hi all, I am trying to fix this bug. But I am not sure how to handle HTTPS request, I have to set |
OOPs, probably we don't need to do any changes in the backend? Because even though I fixed the backend, and the file is correctly rename on the disk, the frontend will still put the wrong name in the file list. And I have to refresh the page to get the right file name. So we still have to parse the header in frontend right? If so, why don't we just put the right filename in the GET request? |
anyway, my first try for backend fix is here: |
@houqp any status update on this? |
@Kondou-ger , almost forgot about this issue ;p The commit I mentioned above fixed the issue on backend. But we need to fix the display on frontend as well. |
cannot think of a clean way to handle this :( |
Any update on this? |
Diese Emailadresse wird nicht mehr genutzt, alle Mails gehen an |
@RandolfCarter I think the ultimate solution to all these issues is to use a proper HTTP client, possibly Guzzle for ownCloud 8. |
This feature was dropped with #14652 |
Expected behaviour
When using the New->From url feature, ownCloud should consider any Content-Disposition headers it gets when retrieving that URL and use the filename given within that header. Only as a fallback (if no such filename header is given), ownCloud should consider taking part of the URL as name.
Actual behaviour
ownCloud determines the name of the resulting file by taking the last part of the URL (everything after the last /).
Steps to reproduce
Server configuration
Operating system: Ubuntu Server 12.04 LTS 64 bit
Web server: Apache 2.2.22
Database: MySQL Ver 14.14 Distrib 5.5.28
PHP version: 5.3.10
ownCloud version: 4.5.5
Client configuration
Browser: Firefox 18.0
Operating system: Windows 7
The text was updated successfully, but these errors were encountered: