hi everyone,
i am trying to upload a file without having to use html input file object, by reading the file contents using fopen and fread. i do it by outputting the contents of the ordinary file into a hidden html input box, then submit the form using javascript. i do it this way for a purpose.
everything works fine in ordinary files like text file, excel, word, etc., except binary files (tar.gz files for example). how can i treat these binary files as just like other files?
Reading binary files
Moderator: General Moderators
Re: Reading binary files
That's... not a file upload. It's something completely different.
Are you putting file data straight into the HTML page? That's your problem, HTML's not meant for binary data like that.
There's not a chance that this is the best way to do whatever it is you want. So how about this: you describe what you're really trying to do, what you are and aren't allowed to use, and we see if there's a better way of doing it.
Are you putting file data straight into the HTML page? That's your problem, HTML's not meant for binary data like that.
There's not a chance that this is the best way to do whatever it is you want. So how about this: you describe what you're really trying to do, what you are and aren't allowed to use, and we see if there's a better way of doing it.
-
Mark Baker
- Forum Regular
- Posts: 710
- Joined: Thu Oct 30, 2008 6:24 pm
Re: Reading binary files
I'm quite intrigued by non-binary versions of excel and word files
Re: Reading binary files
hi,
tasairis is right. there's no way for me to achieve this. i was just challenged by my superior to eliminate the traditional way of uploading a file. you know, click browse button, locate for a file then submit the form. they didn't want that. anyway, i'll just find another way to do that.
thanks.
tasairis is right. there's no way for me to achieve this. i was just challenged by my superior to eliminate the traditional way of uploading a file. you know, click browse button, locate for a file then submit the form. they didn't want that. anyway, i'll just find another way to do that.
thanks.