Uploading image via ftp in Codename One - image

How to upload an image via FTP in Codename One?
I've made many researches but any one lead me to the solution.
I need to provide the hostname, username and password

We don't support FTP, it isn't as commonly used within apps.
Images are uploaded using multipart requests which is the same thing as form submit in HTTP/HTML. For that you will either need a server or a cloud service that accepts multipart requests for you.

Related

Can I use Aliyun VPS server for wechat mini-program?

I am new to wechat development, as I can see from the documentation it requires setting up a server, getting a domain and ssl certificate. I am developing an app that sends a request to a server, fetches pdf file from database and downloads that file to user's phone. Since I am using pdf, I need to store binary data, so VPS hosting should be the best option here. But I am not sure if I can use it for WeChat, I noticed in most documentation and tutorials developers are using cloud services.
Of course.whatever serve provider is.

How can I play video from FTP server to my website?

I am working on a project where the there is a requirement to play video from ftp server in the website. I am not sure how can I do this, but I am trying. This is a CodeIgniter project. What I am doing is that I am connecting to the ftp server using username and password, fetching the video file names and giving it to the video source which is like doing it for playing video using http protocol. I am not sure how to play the video from the source as it's all ftp link. Also there is authorization. I have done some research on that but I did not find anything useful. Can somebody please help?
You will not find a workable, cross-platform, secure solution that does not involve the browser accessing these videos via http(s) instead of FTP (say, with nginx or Apache). Also, if you're dealing with FTP and authentication, you will end up exposing the FTP account's password in URLs, which you absolutely do not want to do. Hope this helps.

FTPS in Spring or Applet

I have a requirement to provide Secure-File-Upload file feature as a new service in my existing application. Expected Upload file size would be huge like over 100MB. If I do plugin-in such feature into my application it will surely die.
At the same time I need to provide or launch that service only through my current application, anyhow I need to achieve it without affecting my current application at any cost.
I am thinking of two solutions in mind, request others advise
Develop a small file uploader web app, host it in a seperate web/app severs,
launch it from my current application through some link. (I can not ask user to login into another new url)
Render an Applet to achieve secure file transfer service (in this point I am not clear whether the applet can directly talk to SFTP server without hindering
my current app's server components)
Further, I am referring to Spring Integration docs with FTP server.
I wonder Can a spring controller receive stream from client via FTPS connection and immediately transfer to FTP server without having to store it in local file.
Please advise your views.
Thanks&Regards,
Sabari

How to Verify server to server communication

I'm having a few problems trying to decide what would be the best solution for something I'm trying to build.
In the applications simplest form, I have a front end server which allows users to upload files which become associated with their account, for example a video or image. The upload file form posts the upload request to the front end server, which then uses a reverse proxy to pass the request directly along to a storage server's API (https://www.example.com/users/username/upload).
What I'm currently stuck on, is trying to work out what the best way to verify that the request being received at the storage servers API is actually being sent from the reverse proxy from the front end server, as opposed to somebody just sending a direct post request to the storage server's API endpoint.
Any suggestions would be really appreciated!
There are multiple ways to do it:
you can use a API Gateway (e.g. APIGEE, AWS AI Gateway etc). Gateway can do request origin validation.
You can let front end app to use OAuth (for storage server) and use
that to get authenticated/authorized at storage server
You can do IP whitelisting between servers & allow a restricted set of IPs in source
You can use MASSL (Mutual Authenthicated SSL) b/w servers to make sure only clients which are verified access your API (may be not for your problem directly but can be used with combination)
These are the simple options if you don't need a complicated or more expensive solution.

Is direct transfer from Dropbox to FTP possible?

Is there a way, to setup directl file transfer from Dropbox/Google Drive/OneDrive... to FTP server. Is it "physically" possible or/and does any API and programming logic even allow that?
No, Dropbox does not offer an FTP interface or functionality like this. Dropbox offers an HTTP based API:
https://www.dropbox.com/developers/core
You could use that API to programmatically download content from Dropbox, and then upload that to an FTP server, but that would require a client in the middle to manage the download and upload.

Resources