Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
Greetings donkjam,
I have here a VB6 sample ported to a Jabaco applet, made to upload files using post via HTTP, but not FTP. Still, I find it useful. The text fields are pre-filled out in this sample, but you need to modify them (especially mime type unless it is a plaintext file), then click select your file & upload. This applet could use some basic code to auto generate the mime type based on extension.
The default php url in this sample, that allows you to test uploading a file, is the original
url provided with the original VB6 sample code and it still works as of right
now. You can change this to your own easily.
If I can find some more time soon, I will make an FTP uploader sample applet. I have attached the HTTP upload sample for now.
Regards,
Jason
httpuploader.zip
I have here a VB6 sample ported to a Jabaco applet, made to upload files using post via HTTP, but not FTP. Still, I find it useful. The text fields are pre-filled out in this sample, but you need to modify them (especially mime type unless it is a plaintext file), then click select your file & upload. This applet could use some basic code to auto generate the mime type based on extension.
The default php url in this sample, that allows you to test uploading a file, is the original
url provided with the original VB6 sample code and it still works as of right
now. You can change this to your own easily.
If I can find some more time soon, I will make an FTP uploader sample applet. I have attached the HTTP upload sample for now.
Regards,
Jason
httpuploader.zip
Revised version of sample
Greetings,
I have here for whoever needs it a sample applet that allows you to upload files to a web server with PHP enabled. I have provided the required htdocs to run it. Simply extract the attached zip to your JabacoProjects directory, open the project, (edit accordingly if needed), and compile the jar file somewhere. Next copy only the compiled jar file to the upload folder you copied into your real htdocs directory on apache or whatever the root is on your other type of web server (IIS, etc.). You also will need post_dump.php (included in the zip file) in the root of your htdocs directory for this demo to work.
Now navigate to http://yoursite.c0m/upload/ ... and index.html (also supplied) should load the java applet.
I have used this for many things when I require to upload data to my server as a binary file. I just copy this projects code into a sectioned off part of my master projects code, copy the stuff from the form and paste it onto a part of your master projects form at a spot that isnt visible, and you can make it all hidden (.visible = false) if you want too after debugging your app and making sure it is uploading files right.
I also should mention, you may want to read up about post_dump.php and modify it to suit your needs and security practices, etc.
And finally, the mime-type (which you can change the default .text value of the its textbox on the form), must match the mime-type of file you are or are going to be uploading via HTTP POST.
Any questions, Ill do my best to answer.
Regards,
Jason
I have here for whoever needs it a sample applet that allows you to upload files to a web server with PHP enabled. I have provided the required htdocs to run it. Simply extract the attached zip to your JabacoProjects directory, open the project, (edit accordingly if needed), and compile the jar file somewhere. Next copy only the compiled jar file to the upload folder you copied into your real htdocs directory on apache or whatever the root is on your other type of web server (IIS, etc.). You also will need post_dump.php (included in the zip file) in the root of your htdocs directory for this demo to work.
Now navigate to http://yoursite.c0m/upload/ ... and index.html (also supplied) should load the java applet.
I have used this for many things when I require to upload data to my server as a binary file. I just copy this projects code into a sectioned off part of my master projects code, copy the stuff from the form and paste it onto a part of your master projects form at a spot that isnt visible, and you can make it all hidden (.visible = false) if you want too after debugging your app and making sure it is uploading files right.
I also should mention, you may want to read up about post_dump.php and modify it to suit your needs and security practices, etc.
And finally, the mime-type (which you can change the default .text value of the its textbox on the form), must match the mime-type of file you are or are going to be uploading via HTTP POST.
Any questions, Ill do my best to answer.
Regards,
Jason
