rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: blondieboy669 on October 23, 2015, 09:35:00 PM

Title: Uploading From mobile device
Post by: blondieboy669 on October 23, 2015, 09:35:00 PM
Hello all,

I recently downloaded HFS and am able to run the server. However I am extremely new to the idea of a file server. I am not new to programming just to the file server concept. The reason I am using HFS is I am developing an android app where I would like to upload byte arrays from the android device to my server, and I am not quite sure how to upload to an HFS programmatically. I have made JSON calls and retrieved data from online databases, now however I would like to upload to my server. Any help is appreciated thank you
Title: Re: Uploading From mobile device
Post by: rejetto on October 24, 2015, 02:13:21 PM
You can go at least 2 ways:

1) you can build an http request that simulates the upload of a file, putting all the data you want in this "virtual" file. This requires no programming on the HFS side, as the upload is a provided service, just configure upload permissions.

2) you make the same "json" requests that you are talking about, just to the proper net address, where HFS is.
Then you will have to define in HFS how to react to such requests.
The default template of HFS already uses requests like that to offer some features. You can find them in sections whose name starts by "ajax."
In there you need to use its own scripting system.