Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
File Upload plugin has invalid URL requested on upload
petern
New
"POST /post/upload/UploadAttachment_1 HTTP/1.1" 404
Lack of URL rewrite again, perhaps?
Lack of URL rewrite again, perhaps?
0
Comments
/index.php?p=/post/upload/UploadAttachment_1
It's a pain to have to tweak all of your plugins when you have Friendly URLs off, but it's generally pretty easy to do.
Obviously, the easiest thing to do is to just turn on URL rewriting! I'm still waiting for a lighttpd guru to come in and write some rewrite rules so I can switch over (or for me to be crazy enough to figure it out by trial and error).
Vanilla Forums COO [GitHub, Twitter, About.me]
It's for drupal but the rewrite rules look suspiciously familiar...
&DeliveryType=VIEW
The lighttpd rewrite rules floating around would hence generate a URL that looked like this:
http://web_root/profile/picture&DeliveryType=VIEW
So that's obviously horribly wrong. The ajax doesn't know that it's argument doesn't make any sense. As a matter of fact, I'm not sure I fully understand how the Apache rewrite rules get around this.
So thanks to the lead to look at writing a lua script, I totally fixed this thing up for lighty. I basically take the request the user made and then append to the back end of the query (p=/blah/blah/blah) with an & and anything that was in the query before.
I gotta clean it up a bit and stuff, but I think this is the solid answer that Lighttpd fans have been looking for. It requires mod_magnet, but hey -- it's a solution!
http://vanillaforums.org/discussion/12811/how-to-lighttpd-rewrite-rules
Open FileUpload/views/link_files.php
On line 19:
Replace
$DownloadUrl = Url(MediaModel::Url($Media));
With
$DownloadUrl = MediaModel::Url($Media);
Maybe you could try that too. As it should work for both types of URL.
Still on beta 1 of 2.0.18
Dan
So filename and where to change is already described.
The github stuff was not to be searched for or anything, it was for reference, that's all.
Thanks, just upgraded to Beta 2 and that seems to have solved my problem.
Dan
https://github.com/vanillaforums/Garden/commit/f7dfea75874d6e2c7f000c00c90118b358f93b06
$DownloadUrl = Asset(MediaModel::Url($Media));
on v2.0.17.10