These are chat archives for SmingHub/Sming
I will take the action for adding the functionality to the filestream class.
For your implementation just do :
FileStream uploadFile; bool uploadFile.attach(String file) -> false if fails. int uploadFile.write(char*,size) -> will always append to the end of the file, returns number of written chars.
Will be available in SmingRTOS shortly.
Passwords -> http basic auth is the way to go.
On addPath : You are right about URI.
On callbacks, indeed it is up to the server to see whether a POST is valid for a URI.
But if the situation is that we by saying with addpath -> uploads OK. Then anyone can just post to that URL and upload a file.
That is what I tried to say in the "prevent abuse" But the Httprequest is not yet complete, so the callback(httprequest,httpresponse) cannot be handled at that moment.
For more files : my impression is that the format of http is :
Headers -- Multipart boundary file1 -- Mulipart boundary file2 -- Multipart boundary
Is that correct ?
HTTP Headers including the boundary -- Multipart boundary Content-Diposition file1 -- Mulipart boundary Content-Diposition file2 -- Multipart boundary --
Do we have SSL support already in SmingRTOS ?
@zhivko Well, if someone wants it I can provide a SSL version that has most of the stuff, apart from certification expiration verification, because there are no SNTP functions in RTOS.