How to save Flutter web file_picker selections to host directory - flutter

There are numerous examples online for using file_picker and uploading to Firestore, SQL etc; but it appears there are none for uploading right to the webhost directory where index.html is being served (i.e ./uploads).
As I am using flutter web in a corporate environment my options for spinning up remote storage options are nearly nil. I merely want my flutter web app to allow users to upload to our own environment (I host my web build off Sharepoint and it works perfect).
The solution for posting to web found here (https://stackoverflow.com/a/65759028/82856) is very close to what I need except for the http.MultipartRequest part as I don't have a server API listening for POST requests. What other options do I have for merely writing uploads to a directory like ./upload? Thanks in advance.

Related

Is there a way to sync PWA web client IndexedDB data to OneDrive?

I am developing a PWA web client app. The data is stored on local IndexedDB.
Is there a way to sync the IndexedDB data to OneDrive with its api? Or I have to develop my own server for syncing data.
I have checked the OneDrive api, and I know it supports files sync. I don't know how draw.io does, seems like it saves the file to OneDrive.
Right now I am considering to change the app to Chrome extension with google sync or make an Electron app to use OneDrive to sync the data.

how to connect and deploy a flutter app to "real server" base on .netcore+iis+sqlserver

I have a project to make a website and application, and i did it by .net core and sql server and deploy it on iis and finally real server and special domain. Also i did my flutter app and tested it by url on local host ('http://192.168.1.110/project_Name/Controller/method_Name') to get connect with my database and it answered currectly,
But now i have a problem with my url to connect real server and create data on sql on server side(i can not find any special pattern to write url with domain-server-port and ...).
i dont know how to do it ,for example Should i add my fluttr app by iis or just change (new type of)url to get connection with my website backend ??
all of the sources learn about localhost.
could some one answer me about it or introduce appropriate source to guide??
One way to do that is to serve the flutter app as static files, you can achieve that by copying the output of flutter build web to the wwwroot folder of the ASP.Net core project should look something like this :
And then you need to serve it by adding the static files middleware in your request pipeline in your Startup.cs Configure method using the app.UseStaticFiles();
You should then access your flutter web application following the URL :
https://yourdomainname/index.html

Can I access and change a file on ftp server using flutter WEB?

I already read this article about working with ftp:
https://pub.dev/documentation/ftpclient/latest/
but this simply doesn't seem to work on flutter Web because of using dart.io package.
Is there any way or library to access and write files to ftp server?
thanks.

Migrate ionic app in a server as a website

I have an ionic app that is connected to the mySQL database from a server and I want to migrate this app to the same server. I want to use this application as a website, which will continue to extract data from the mySQL database. How can I do that?
Thank you.
First I think you should probably split this into two projects:
the Ionic app, which communicates with the server via the API
the server side API (PHP file) with connection to the database
Usually these two would be in separate (Git) repositories.
You can then execute ionic build --prod to build the Ionic app for the web. The deployable files will be in the www directory once the command has finished. You can copy the files in this directory to a webserver like Apache or nginx, or you can easily deploy it to Firebase Hosting for example as well. It's just static files (HTML, CSS, JS, images, etc.).
You can find more information about deploying an Ionic app as a PWA (progressive web app) here. It also shows you how to deploy to Firebase Hosting, which has a free plan to get started with.

Progressive web app unable to download files

Good day
I am currently trying to develop a progressive web app for a Moodle site, but I am unable to download files from the Moodle site.
I made use of https://www.pwabuilder.com/ to build the PWA and generate the service workers. I added the service workers to the https Moodle site, as required. The service workers are registered as they should be when using the PWA.
The PWA work perfectly for opening external links soos as URLs (URLs open in the app browser as needed).
I am however unable to download any files such as pdf documents from the moodle site.
I tried to develop an Ionic app with a basic iframe which embeds the Moodle site in order to determine if that would work. I was able to open external links as well, but still unable to open/download documents.
I then embedded the following website http://www.pdfpdf.com/samples/ in an iframe in an Ionic app, which hosts some sample pdf files. I was then able to download the pdf documents as needed.
I them embedded another website from another server that we have, but was also unable to download any documents
When emulating the Ionic app in a browser, I have always been able to download files as needed, as it is just another "browser" accessing the files.
So my guess is that some configuration on the server is blocking the download of files when requested from an app such as a progressive web app?
Any help or pointers would be highly appreciated.