In This Post, Devran Cosmo Uenal explained how to download a file with swift on an IOS device. Should the files that I want to download be stored on an FTP server? Or on a regular web server with Apache?
NSURLTask supports both protocols but the post you are referring to uses a regular http server.
Also the post uses the Alamofire library which I think only supports http
Related
I have a GRPC service running written in Python. I have the python support proto file for the same.
I want to integrate this backend with AngularJS+Typescript UI.
Questions are:
Is it possible?
Do I have to change anything in the Python grpc server end?
I checked online and it seems Envoy help in doing similar thing, is Envoy the only solution? As I tried a lot and its not working.
What all changes are required.
Yes, gRPC support javascript, you don't need to modify the server, just use service proto generate client javascript files, and use typescript call the function. You need add the grpc-web to your client project. Envoy is not necessary for request server.
Yes, you can integrate gRPC API's with angular(typescript).
follow here it will helpful.
I am developing an Ionic hybrid app and one of the features is taking/choosing a picture and uploading it to the server. I found plenty of examples of how to use $cordovaFileTransfer plugin. The problem is that my backend is in Django and I don't really understand how to process the upload request from the cordova plugin.
Any help or a small example would be appreciated. Thank you.
$cordovaFileTransfer is only the Ionic wrapper for the cordova file transfer plugin. The documentation says:
The FileTransfer object provides a way to upload files using an HTTP multi-part POST or PUT request, and to download files as well.
Since these are simple http POST requests, you don't need nothing special but only the Django file uploads documentation that contains a well documented example.
I am trying to make a angularjs application, independent from a node.js server that is running sailsjs.
I would like to use socket.io for this application and apparently I need to get the socket.io.js file from the server.
In my client I load the js file in my Index.html file using:
<script src="http://localhost:1337/socket.io/socket.io.js"></script>
However sails do not deliver the file because of a handshake error.
Is there anyway to get the file from the server?
Thanks
If you don't need the node.js server, why don't you just copy the socket.io.js file to the web server, and fetch it from there?
The handshake error is explained here: https://github.com/balderdashy/sails/wiki/sockets#500-error-handshake-error-returned-from-socketio-request
You do not have a session with the server so when socket.io.js is included, there is no session cookie for it to use and the handshake fails. You need to make a successful request to the server beforehand that opens a session. This would need to be a CORS request since your server and their server are on different domains. CORS would need to be enabled on the server side using the method explained here: https://github.com/balderdashy/sails-wiki/blob/0.9/config.routes.md#cors-cross-origin-resource-sharing
The easy way is the Javascript Client SDK to communicate with Sails via sockets.
Here is the official project on github: https://github.com/balderdashy/sails.io.js
I have a Access 2010 frontend database + MySQL as backend. So far it is working fine. I would like to upload document and decided to save on the server rather than on the Database. My first question is, how do I upload file from access frontend to the remote server/location?
I was thinking, maybe store the data on the database and use some kind of triggers or script which reads the blob file from database and saves on the server as well as fills the file path into another column.
is there any easier way to upload files from access frontend to a remote server? I am using MySQL server as backend.
thank you in advance
SFTP with Putty
This might help you - it's a great example using Putty on the Windows machine to communicate over SFTP with the Linux server using VBA: SFTP upload with VBA
You would need to install putty on each Windows machine that uses Access and ensure that the appropriate rights are in place on the Linux server.
Custom Add-In
You could use .NET to create an add-in for access to transfer the file to the server over sockets, but this would require you to write a server-side application to listen for requests. You would have complete freedom over how you implement it at the cost of added complexity for yourself as the developer.
You would need to:
Create an add-in using Visual Studio (or other .NET IDE)
Add this into your Access application and use the API you've built.
Create a server-side application to listen to it (this could be a simple Python application)
SMTP Approach
If you want to be creative you could email the file to your own mock SMTP server using Access' CDO functionality: Sending emails with Access
Again, you would have to create a handler application to handle the SMTP protocol, but I'm sure there are some great examples out there.
HTTP Approach
You could even encode the file and send it over HTTP to a simple PHP server in a simple POST request: Example web request with Access You would need to encode the file to base64 or something or file a way of handling file uploads.
Conclusion
As you can see, the easiest approach by far is using Putty, but there are some interesting custom approaches you could take.
I'd say using either SMTP or HTTP would be suitable but that depends how easily you could set up the server-side handler. There may be existing SMTP emulators out there that you could use to handle receiving and managing files.
this might help someone.
I have used Chilkat FTP activeX component and its working fine. Chilkat provides prewritten code just copied from his website and everything is fine. Although I could not find how to show the transferring progress.
regards
krish
I'm trying to setup Flash Media Server with an external Apache in order to stream some vod content in a HTML5 video Player in chrome browser.
I've followed the instructions Adobe Help but that doesn't help much. I can see FMS and FMSHttpd services running in the services list.
Normal html pages display fine, however, the video is not streaming.
I don't want to use the Apache that comes in the same package.
I'm streaming it to a html5 video element and the code goes like this in html
<video controls="controls" autoplay="autoplay"
src="http://localhost/vod/sample2_1000kbps.f4v" width="480" height="352">Video Tag not supported</video>
The FMS and Apache both are in a windows machine, but in different locations.
The video plays fine when I use the Apache of the FMS Package.
I know i might have made a mistake in several places in this complex setup, however, any help will be appreciated.
Thanks in advance
Make sure you are attempting to use Apache (even one you install yourself). Using another web server like IIS will not work.
Can you request the URL directly? http://localhost/vod/sample2_1000kbps.f4v. You will need to make sure that the manually installed Apache is configured to look at the correct location on disk, where the file is actually located.
That URL looks like you are trying to progressive download the file. FMS is not involved in this at all. Can you explain what you are trying to achieve in more detail.
If you are not using the Apache installed by FMS you should not even see FMFShhtp in the list of services.
Stop fmshttpd. in your manual Apache httpd.conf make sure that DocumentRoot is pointing to the correct location where the vod/sample2_1000kbps.f4v file is located. Start the manual Apache. Request the file. What is in the Apache access/error logs?
Why do you not want to use the Apache shipped with FMS?
i guess i have figured that out. built in apache was listening to port 8134 instead of default 80. so when i put the URL as computername:8134 it all worked fine.