Home User CP Donate Chat Register Today!  
  Get New posts Faq / Help?
   


Go Back   Hackint0sh > Projects and Hacks > iPhone > Applications & Development > Free Toolchain Software

Reply
 
LinkBack (8) Thread Tools Display Modes
  8 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 12-02-2007, 07:44 AM
hachu
Status: Offline
Senior Member
 
Join Date: Jul 2007
Posts: 151
Rep Power: 13
hachu will become famous soon enough
Default [MobileSafari] File Download plug-in

So, I got curious after work one day and decided to figure out how to write a simple MobileSafari plugin. This took me 3 days.

This one lets you download most zip and tar files. I tried to make it download png, gif, and jpgs, but because Safari handles it already, I don't think I can ever make that work.

This was developed targeting 1.0.2. I haven't tried it on 1.1.1 or 1.1.2.
(Updated) XianLi says in this thread that it works fine for him on 1.1.2.

No warranty or liability of any kind, of course. Don't blame me if it somehow messes up your data, though it isn't supposed to affect anything outside the Downloads folder it created.

How to use:
Copy the plugin bundle into "/System/Library/Internet Plug-Ins", and then reboot the phone.
It will create a folder called Downloads next to Library and Media in your root home folder. It will only download there.

When you click on a link that is downloadable, a large button will appear. Click on it to download. Click the normal page back button to not download, or to go back when it's complete.

http://www.badongo.com/file/5544413

Update: Version 0.2 posted.
New to 0.2: Progress bar. Basic instructional text. Allow user to choose name to save as.
Features tried and failed: Percentage and KB/sec as text. I have the value as a variable, NSString simply fails to display it correctly on 1.0.2.

Anything else I want to say cuz you're still reading:
Yes, it looks kinda ugly.
Please don't post any requests for other plugins in this thread. That's a good sign for me to ignore you.
Like any other projects I do publicly, whether or not I continue to improve it is based off how much time I have outside of work, whether or not I feel like working on it, and the quality of feedback I get. (seeing stupid posts with awful use of punctuation and no real content or irrelevant content makes me lose interest fast, seeing high quality posts like "By the way, if I do this, this, and this, it crashes. I think you might have forgot to check if such and such value happens to be blank" makes me feel appreciated because you're showing to me you actually care and are trying to be constructively helpful.)

Last edited by hachu; 12-11-2007 at 07:00 AM. Reason: Updated for 0.2.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 12-02-2007, 11:42 AM
Shakaa
Status: Offline
Member
 
Join Date: Oct 2007
Posts: 43
Rep Power: 0
Shakaa is on a distinguished road
Default

If you want constructive help, release the sources...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 12-02-2007, 01:06 PM
thatonealex
Status: Offline
Member
 
Join Date: Nov 2007
Posts: 40
Rep Power: 0
thatonealex is on a distinguished road
Default

Works well for me on 1.1.1 .. let me download it fine.

For anyone that doesnt know.. it saves it in /var/root/Downloads

I also tried adding extensions to the plist, but that doesnt seem to work, is there something that needs to be added to the LCDownloader aswell? If so can you please make this opensource so we can experiment ourselves

Looks very promising, hope a lot more extensions will be added!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Sponsored links Remove advertisements
Advertisement
Advertisement

  #4 (permalink)  
Old 12-02-2007, 03:38 PM
NlSangia
Status: Offline
Junior Member
 
Join Date: Dec 2007
Posts: 4
Rep Power: 0
NlSangia is on a distinguished road
Default

Thank you so much hachu for releasing it, i think it can be really promising ! Now we're all waiting for you to release the source so that we could give you some help to improve it...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 12-02-2007, 05:14 PM
Pablo Diablo's Avatar
Pablo Diablo
Status: Offline
Member
 
Join Date: Oct 2007
Posts: 81
Rep Power: 7
Pablo Diablo is on a distinguished road
Default

can you download mp3 with this? Or is it just zip and tar?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 12-02-2007, 08:27 PM
hachu
Status: Offline
Senior Member
 
Join Date: Jul 2007
Posts: 151
Rep Power: 13
hachu will become famous soon enough
Default

You'll have to add the mime type that it appears with, so use the tar and zip examples and replicate that.

The app itself doesn't carry the mime/ext info, so it's just the plist. This is because of how the plugin system works, so I don't think can't change this. (at least that's what the docs seem to say)

I added entries to the plist for image types, but I either got the wrong mime types or Safari skips trying to load plugins for those because it knows it can handle them itself. So feel free to experiment on that.

Also, I don't know what happens if you add anything that is normally supported by the Quicktime Plugin. So, I didn't try mp3s.

The source looks like a complete mess because I tried to display more info using a UITextField and it didn't work, so I'll consider releasing it later when there's no longer more code commented out than actually running.

Quote:
Originally Posted by thatonealex View Post
Works well for me on 1.1.1 .. let me download it fine.

For anyone that doesnt know.. it saves it in /var/root/Downloads

I also tried adding extensions to the plist, but that doesnt seem to work, is there something that needs to be added to the LCDownloader aswell? If so can you please make this opensource so we can experiment ourselves

Looks very promising, hope a lot more extensions will be added!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Sponsored links Remove advertisements
Advertisement
Advertisement

  #7 (permalink)  
Old 12-02-2007, 09:10 PM
Former Bender's Avatar
Former Bender
Status: Offline
Guest
 
Join Date: Nov 1970
Posts: 3,501
Rep Power: 0
Former Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud ofFormer Bender has much to be proud of
Default

Great plugin !

Confirmed to work on 1.1.2
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 12-02-2007, 09:43 PM
thatonealex
Status: Offline
Member
 
Join Date: Nov 2007
Posts: 40
Rep Power: 0
thatonealex is on a distinguished road
Default

Ive found the one required for .avi files..

add this to the plist..

Code:
<key>video/x-msvideo</key>
		<dict>
			<key>WebPluginExtensions</key>
			<array>
				<string>avi</string>
			</array>
			<key>WebPluginTypeDescription</key>
			<string>avi File</string>
			<key>WebPluginTypeEnabled</key>
			<true/>
		</dict>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 12-02-2007, 11:41 PM
Shakaa
Status: Offline
Member
 
Join Date: Oct 2007
Posts: 43
Rep Power: 0
Shakaa is on a distinguished road
Default

Great plugin, can't wait for the sources
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Sponsored links Remove advertisements
Advertisement
Advertisement

  #10 (permalink)  
Old 12-03-2007, 12:25 AM
Savoury
Status: Offline
Developer
 
Join Date: Sep 2007
Location: Germany
Posts: 225
Rep Power: 15
Savoury is on a distinguished road
Send a message via ICQ to Savoury Send a message via MSN to Savoury
Default

Could somebody please upload it to rapid$hare? the waiting time is horrible...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


LinkBacks (?)
LinkBack to this Thread: http://www.hackint0sh.org/f126/18060.htm
Posted By For Type Date
safari??FileDownload ?????0.2e1?????/??? - iPhone???? - iPhone??????? - WeiPhone??? iPhone ??|iPod Touch ??|Google G1??|Palm Pre ??|???iPhone - Powered by Discuz! This thread Refback 01-14-2009 06:56 PM
Descarga en tu iPhone con Safari Mobile This thread Refback 01-14-2009 05:26 PM
Download files from the web directly to your iPhone or iPod Touch This thread Refback 01-14-2009 03:12 PM
Plugin de tlchargement pour iPhone | Blog Iphone-Apple.fr This thread Refback 01-14-2009 01:43 PM
Mobile Safari plug-in downloads files to your iPhone/iPod touch - The Unofficial Apple Weblog (TUAW) This thread Refback 01-14-2009 12:30 PM
?????????? ?????? ? iPhone ?? Safari | 1Pod.ru This thread Refback 01-14-2009 12:13 PM
iPhone & iPod touch Mobile Safari plugin for downloading files This thread Refback 01-14-2009 11:50 AM
Mobile Safari plug-in downloads files to your iPhone/iPod touch - The Unofficial Apple Weblog (TUAW) This thread Refback 01-14-2009 11:43 AM



All times are GMT +2. The time now is 06:22 AM.



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2 Ad Management by RedTyger
follow us on Twitter!

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448