TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 06-04-2008, 06:39 PM   #1 (permalink)
The Frequenter
Newcomer 
 
xenon's Avatar
 
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
xenon is on a distinguished road
Default Aptana Jaxer and file uploads

Hey guys. I need an advice about some paths. Well, I developed a file manager (let's say it's something like the Windows Explorer - a simple system navigator) using Aptana's Jaxer. Now, in Javascript I only have the filesystem paths (on windows they will be like C:/dir/file.jpg, for example). How would I upload these paths using only Javascript and PHP (if possible)? I've tried this, so far:

1. create a hidden form, with a file input inside it. The idea was to populate the file input with one path at a time, and then submit the form inside an iframe or something like that (so I would also get a response from the server). That didn't work, as the file type inputs are read-only. I also tried using a file input and a hidden input with the same name, but that didn't work either.
2. use Jaxer's file management functions (tried to read a local file into a buffer and send pieces to the server to rebuild the file). The only problem is that I receive an error when reading from a non-text file (a JPEG, for instance), where the contents are not in utf-8 encoding. So this won't work, either.

A solution would be to use an additional SWF file for the communication between javascript and PHP, therefore getting the ability to build a progress bar, aswell. But, I can do that from Javascript too, if just I could read the file somehow...

LE: by 'uploading the paths' I mean uploading the files on the local filesystem with that specific path.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.

Last edited by xenon : 06-05-2008 at 12:04 AM.
xenon is offline  
Reply With Quote
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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


All times are GMT. The time now is 05:59 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design