| |
dink Account closed
Registered: Mar 2012 Posts: 30 |
Lots of % codes in filenames
Lately it seems like most of the files downloaded have %## translation codes in them, for example, look at the file name in this release: Plumb Crazy +1D (Loadstar)
Could it be that the uploading script isn't properly translating the filename when it gets uploaded? |
|
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
yeah, bug. when you dl, the codes become part of filename.
this server is OOOOOOLD
that % doesnt get fixed before entering the db |
| |
Beastifire Account closed
Registered: Mar 2013 Posts: 40 |
URLs aren't supposed to have arbitrary characters in them. You're supposed to encode weird ones with this method, so this is arguably correct. Don't remember what the RFC document no for URLs is, but that should be possible to look up. |
| |
bepp
Registered: Jun 2010 Posts: 264 |
Agree that it's good practise to encode the url but encoding the text of the link doesn't make any sense. I think it's just a code slip. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11129 |
i think that happens because the text in the link shows the actual filename on the (hidden) ftp. even that is argueable correct (yet ugly, agreed :)) |
| |
Krill
Registered: Apr 2002 Posts: 2850 |
Arguably, this is indeed ugly. URLs can have arbitrary characters in them, but they will get translated to UTF8-percent-encoding and others by your user agent when sent over the wire. So when saving a file, having low-level URL encoding garbage in the filename is... well, ugly. :) |
| |
Burglar
Registered: Dec 2004 Posts: 1033 |
its fixable btw, but it'll be an annoying task, and different browsers will handle stuff differently too.
so, just dont use weird chars in ur filenames ;) |
| |
Fred
Registered: Feb 2003 Posts: 284 |
It's very easy to fix. Just decode the URL for the download display link.
You can do it via Javascript with decodeURIComponent or use the urldecode function in PHP. |
| |
Perff Administrator
Posts: 1665 |
Added the sugested urldecode for displaying the link.
Also added the urldecode to the script that fetches the file form the fileserver and sends it to the user. Not sure if that will mess up the download in certain cases - if it does please let me know. :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11129 |
while at it, add a TRIM to all input boxes, its annoying as fuck if you paste something in there and have to remove leadin or trailing spaces to make some search query work :) (now that i say it, i see its fixed in the sidebar, eh =D) |
| |
Perff Administrator
Posts: 1665 |
Quote:while at it, add a TRIM to all input boxes
Better now? :)
Is there anywhere where it might seem fit NOT to trim input? |
| |
iAN CooG
Registered: May 2002 Posts: 3136 |
thx Perff =) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11129 |
"Is there anywhere where it might seem fit NOT to trim input?"
cant think of anything... *shrug* |
| |
dink Account closed
Registered: Mar 2012 Posts: 30 |
it seems to be working just fine now :) |
| |
bepp
Registered: Jun 2010 Posts: 264 |
Yay! Beautiful, Perff. Nice. And thanks for quick support! |
| |
Count Zero
Registered: Jan 2003 Posts: 1825 |
While not really caring for %escaped filenames too much really I truely wish for binary entries on the database not being uploaded multiple times when actually containing different releases.
E.g. the made up example "DISK181b.d64" is uploaded several times as the binary to a diskmag, some tool AND some silly note... Geez thx for letting me look at the same disk three times - FUCK YOU UPLOADER OF SOME SILLY SWAPPER MADE DISK!
Take your time to extract, put together and rename properly - FUCKIN PLEASE! |
| |
bugjam
Registered: Apr 2003 Posts: 2492 |
If I am not totally mistaken, I heard voices requesting exactly the opposite - not to rip spread disks apart.
I for my part will not bother, I think I spend quite enough time with uploading. :-) And I also upload a mixed disk only once, and then just copy-paste the download link, not to waste space unneccesarily. |