In this video you learned how to upload files from your client app to your server app, how about uploading this files to Azure Blob Storage? Look no further: ua-cam.com/video/5fJZQcukagk/v-deo.html
It definitely needs a series! 😄 I am planning it though. What about: setting up 1. Azure service & getting api keys, 2. Implement Android, 3. Implement iOS, 4. Implement uwp 5. Implement server-side code ?
You're very honeslty good. Can you please build an entire project from start to finish like this. Weather App Design in Adobe XD (Wireframe/Mockup + Prototype) - UA-cam, but by also building your own server and storing images of cities on it for the app to retrieve later.
I think saving binary data in an SQL server is not something you should do, it's not optimized for it, you're better off saving a filepath or URL in your database and store your file on a filesystem
great video, I have been able to upload multimedia content to Blob Storage when using Postman using what you showed in your other video, now I only have to discover where I am facing to implement this and I will be able to upload pictures to an storage account in Azure using Xamarin Forms (:
@@jfversluis I already discovered why it wasn't working, apparently, the content-type property of the file is null when it is received in the ApiController (IFormFile file in httpRequest.Form.Files) even tho the original file in Xamarin Forms has the correct content type. I simply changed the conditionals in the API controller that check the value of the content type and now they check a parameter given in the URI, and it works just fine. Any idea why this happens?
@Gerald Versluis: Another idea for a video. I am a single developer and I am struggling with the right subscription for Azure-Services. I just need a Webservice and a small SQL-Database for Testing-Purposes but the Azure-Calculator says it costs me a fortune, especially the SQL-Server. I think that many single developers would care about that subject...
I think they changed something not too long ago. When you create an SQL database, make sure that you looks closely at the top. For me it says: Looking for Basic, x and y? And if you click that you go to another screen where you can set it to Basic which will cost you about 5 Dollars a month.
Thank you Anass! Two methods come to mind: make the link predictable, so just have the root of the link in your app already, just add the filename of the file that you just uploaded and you have your link. Or, in the response of the upload action you can add some content or header that will return the link of the file that was just uploaded :)
I remember doing something like this a few years back. Except i ran into an issue where uploading a larger video caused the app to crash because i loaded the entire video into memory and sent it to the server as one whole. I had to implement uploading with content-disposition on the server side to basically upload the video in chunks to avoid filling up the memory. Now i dont know if the default ways of uploading have changed but does the example you show handle large files well? otherwise a video about uploading large files in chunks might be useful to people. Maybe we could collaborate on it if you like.
@@jfversluis Thanks so much for your reply Gerald! Is there a reference you could point me to in order to implement using a public ip address? Right now, I can get everything you've shared to work when I'm on my own machine and when the android device is on the same network. However, it stops working when the app is running on an external network unfortunately.
Honestly it shouldn’t be more than changing the address. However, then security measures come into play. You’ll want to check if your remote server needs any special headers or query parameters etc to specify a security key or maybe on the server-side see if you’ve set it up correctly to receive remote connections. It’s pretty hard to make a video about because there could be a million different reasons why it isn’t working
Hi Gerald hehe , could you please point me in the right direction or make a video on how to download a XML file from onedrive to xamarin forms (iOS)? I know how to read embedded XML file, but in this case I need to download the file from internet(url)(as example one drive, google drive, dropbox etc...) Thanks
@@jfversluis well it will be a private folder with a XML file in one drive, but if it is too complicated with password, I can start learning how to do it in a public folder url.
Yeah with all the authentication involved it can be a hard thing to implement. From a public url it’s much easier. I do it with JSON here: ua-cam.com/video/rq3iok03q7E/v-deo.html that should get you started
@@jfversluis ooohh nice nice nice, I will see the video, yes i can make some sacrifices and use a public folder since the information that will be stored in the xml file is not that sensitive. Thank you. 🙂✌🏽
thank you very much, muchas gracias tus videos han transcendido hasta habla hispana, por favor si puedes mantener los subtítulos en tus videos. para los que no entendemos ingles es una guiá.
That is great Andres! Muchas gracias! All my videos will have subtitles, sorry it’s only in English, my Spanish isn’t great 😢 You might also want to check Javier’s channel, I think he has some Spanish content: ua-cam.com/users/JavierSu%C3%A1rezRuiz
@@jfversluis yes, i have been trying for the past 3 hours, and just now i managed to pull it .. now its working xD , but still i prefer if we can have a full video details about smtp, using app, for example, the page i was working on have name, email, phone no, message box, and attachment.. when user press send, it will go to the email... the email will have all details along with attachment.. btw it worked while i used portion of your other video titled (Using FilePicker in Xamarin Essentials to Pick PDFs, Images and More!)
Maybe for one of the next Videos: best practice to publish an App. Especially I am looking for ways without using a store. I publish my Apps only locally and right now I just deploy the APK to device manually. There must be better ways...
@@jfversluis, MDM solutions is new to be, but looks promising. I checked out App Center already but it did not figure out how to push an update to a Device. I develop apps for mobile Barcode-Scanner (Android) that should not have any access to Google Store, E-Mail, etc. They run in a Kiosk-Mode. I think that this scenario of an only intern use of an app is not very well documented in the web. Be the first ! ;-)
@@LobsterHarry very true. While I do hear a lot of people having these scenarios so that’s cool. Ah you really want to automatically update? I do know app center has in-app updates and you can make them mandatory, but it will still be the user that has to do it
@@jfversluis, you see that there are a lot of options... Please help us through this jungle ! I can image that those kind of subject does not challenge you very much but I see not other guys who are offering those things. Be unique ! ;-)
Picking multiple images at once isn’t supported yet. The MediaPicker only provides the picking, you will have to upload yourself a video on that is here: ua-cam.com/video/KPDGtLeNClQ/v-deo.html
Sir, thanks for a prompt response. I am using xamarin essential file picker to select multiple images and file uploader plugin to upload .can you help me on this how can I send multiple images through this.
@@dreamhunter2895 I think I mention something about multiple files, right? Here are the docs: docs.microsoft.com/xamarin/essentials/file-picker?tabs=ios#pick-multiple-files And here is a video on how to upload files: ua-cam.com/video/KPDGtLeNClQ/v-deo.html
hi... thanks for this learning video... can i ask you something regarding this video ? There's no error but the image was no save on upload folder (iis web server ). Is there any clue / any step that i must do, so image can be save in the server
Typically that is done through a separate request! Think about it… which app lets you set both the profile image and other profile details in one go? They are usually separate:)
Sir, When i have changed to Https then getting error(Java.IO.IOException: stream was reset: PROTOCOL_ERROR at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod) etc. Please suggest Sir on this.
I've recorded it! Planning to release it next week. If you want to see it right now consider a membership! ua-cam.com/channels/BBZ2kXWmd8eXlHg2wEaClw.htmljoin
@@maxipunchik ah right. I would expect it to leverage that same mechanism yes. If you have more than one camera app and not specified a default one, you will be asked. If you have a default one, that will be used.
How to barcode scanner in Xamarin Form through web API , I have made web API project which is connect to sql server Database. I try to Scan Barcode result(Data) through Web API to sql server Database.
@@jfversluis I want to Barcode scanner Result(example :Barcode 123456780) go to Sql server DataBase , but Xamarin form can not go to sql server Database , I want use webAPi with Bridge to connect Barcode Scanner Result with webAPI , webAPI can go through SQL serverDataBase,Thanks for your Help
@@Wajih_Ahmed ah that might be. I think that wasn’t available on all platforms when this was first implemented. Also there then a loop where you select multiple files or you’ll have to implement something custom for file picking
Well intended example which did not work for me. Also jumping some bits did not help, hard coded IPs could be OK if the UploadFile context was working properly. Potential issues with the sample source code :/
In this video you learned how to upload files from your client app to your server app, how about uploading this files to Azure Blob Storage? Look no further: ua-cam.com/video/5fJZQcukagk/v-deo.html
You are great, I met you because of Kym recommendation. Such a great video !
Oh thank you! That is so nice of Kym! ❤️
Hola! Man you are a King....! I am student, doing me project in Xamarin forms and your Videos help me a lot . Love from Pakistan
That is wonderful to hear Omar! You'll be graduating in no-time! :D
Man, i just wanna say thank you for this and others great xamarin tutorials! :D
I appreciate you taking the time to tell me. That really keeps me going, thank you so much!
You my friend are a fantastic teacher. thanks so much for making sense and being complete.
Wow Steven, thanks for this! You made my day!
very clear and great work from you gerald!! really loving your videos :) . thanks a lot and waiting for more.
Many thanks Uday! Thank you for taking the time to let me know. Is there anything specific you'd want to learn?
@@jfversluis how about pushnotification implementation in XF ? may be this topic need a series of videos ..
It definitely needs a series! 😄 I am planning it though. What about: setting up 1. Azure service & getting api keys, 2. Implement Android, 3. Implement iOS, 4. Implement uwp 5. Implement server-side code ?
@@jfversluis wow.. this would be great !! I am eagerly waiting ..😍👍
You're very honeslty good. Can you please build an entire project from start to finish like this. Weather App Design in Adobe XD (Wireframe/Mockup + Prototype) - UA-cam, but by also building your own server and storing images of cities on it for the app to retrieve later.
Thank you so much for your kind words! As much as I'd love to do that I'm focussing on the single concepts for now :)
Great Gerald , only you are champ of xamarin. Thanks alot.
Haha thanks Vijai! Appreciate it!
Great video, really. I would really like a video on the server part but saving binary data in sql server table. Thanks in advance.
I think saving binary data in an SQL server is not something you should do, it's not optimized for it, you're better off saving a filepath or URL in your database and store your file on a filesystem
This man is the best, hes reading my mind!! Please could you make a video about inapp purchase with google and apple pay pleeeease
Nice one! I'll add it, did you see this? github.com/jamesmontemagno/InAppBillingPlugin
@@jfversluis yeah sow it, but very old and bad documentation
@@THE_NE0 Understood, I'll see what I can do!
Very nice so far!
You can also do a copy direct to the file system:
using var fileStream = File.Create();
file.CopyTo(fileStream);
Fantastic! I always get confused what method to use with all these streams and things... This seems a bit simpler though :D
great video, I have been able to upload multimedia content to Blob Storage when using Postman using what you showed in your other video, now I only have to discover where I am facing to implement this and I will be able to upload pictures to an storage account in Azure using Xamarin Forms (:
Woohoo that is awesome! Let me know how it goes!
@@jfversluis I already discovered why it wasn't working, apparently, the content-type property of the file is null when it is received in the ApiController (IFormFile file in httpRequest.Form.Files) even tho the original file in Xamarin Forms has the correct content type.
I simply changed the conditionals in the API controller that check the value of the content type and now they check a parameter given in the URI, and it works just fine.
Any idea why this happens?
@@jwj4535 hm not without any code or looking into it. Glad you figured it out!
Nice and clear ! Well done
Thank you! Cheers!
@Gerald Versluis: Another idea for a video. I am a single developer and I am struggling with the right subscription for Azure-Services. I just need a Webservice and a small SQL-Database for Testing-Purposes but the Azure-Calculator says it costs me a fortune, especially the SQL-Server. I think that many single developers would care about that subject...
I think they changed something not too long ago. When you create an SQL database, make sure that you looks closely at the top. For me it says: Looking for Basic, x and y? And if you click that you go to another screen where you can set it to Basic which will cost you about 5 Dollars a month.
Hi, Please also create a video for how to download files (ex: pdf) and open them within Xamarin.Forms Apps. Thanks!
I've made something like this now here: ua-cam.com/video/BcFlZMhPmVk/v-deo.html
thank you for this great tutorial
how I can when upload image retrieve the link to show in my app Xamarin
Thank you Anass! Two methods come to mind: make the link predictable, so just have the root of the link in your app already, just add the filename of the file that you just uploaded and you have your link.
Or, in the response of the upload action you can add some content or header that will return the link of the file that was just uploaded :)
I remember doing something like this a few years back. Except i ran into an issue where uploading a larger video caused the app to crash because i loaded the entire video into memory and sent it to the server as one whole. I had to implement uploading with content-disposition on the server side to basically upload the video in chunks to avoid filling up the memory.
Now i dont know if the default ways of uploading have changed but does the example you show handle large files well? otherwise a video about uploading large files in chunks might be useful to people. Maybe we could collaborate on it if you like.
Oooh interesting, yeah that might be true! Send me a message and see if we can work together, that sounds fun!
Great video! Thanks!
Can this be done using a public ip address such that the mobile app can be used outside the server's network.
Of course absolutely!
@@jfversluis Thanks so much for your reply Gerald! Is there a reference you could point me to in order to implement using a public ip address? Right now, I can get everything you've shared to work when I'm on my own machine and when the android device is on the same network. However, it stops working when the app is running on an external network unfortunately.
Honestly it shouldn’t be more than changing the address. However, then security measures come into play. You’ll want to check if your remote server needs any special headers or query parameters etc to specify a security key or maybe on the server-side see if you’ve set it up correctly to receive remote connections.
It’s pretty hard to make a video about because there could be a million different reasons why it isn’t working
Hi Gerald hehe , could you please point me in the right direction or make a video on how to download a XML file from onedrive to xamarin forms (iOS)?
I know how to read embedded XML file, but in this case I need to download the file from internet(url)(as example one drive, google drive, dropbox etc...)
Thanks
Is it a publicly accessible URL?
@@jfversluis well it will be a private folder with a XML file in one drive, but if it is too complicated with password, I can start learning how to do it in a public folder url.
Yeah with all the authentication involved it can be a hard thing to implement. From a public url it’s much easier. I do it with JSON here: ua-cam.com/video/rq3iok03q7E/v-deo.html that should get you started
@@jfversluis ooohh nice nice nice, I will see the video, yes i can make some sacrifices and use a public folder since the information that will be stored in the xml file is not that sensitive.
Thank you. 🙂✌🏽
thank you very much, muchas gracias tus videos han transcendido hasta habla hispana, por favor si puedes mantener los subtítulos en tus videos. para los que no entendemos ingles es una guiá.
That is great Andres! Muchas gracias! All my videos will have subtitles, sorry it’s only in English, my Spanish isn’t great 😢
You might also want to check Javier’s channel, I think he has some Spanish content: ua-cam.com/users/JavierSu%C3%A1rezRuiz
can you make a video on how to select a file and send it as attachment with smtp? thanks
Send it directly through smtp from the app?
@@jfversluis yes, i have been trying for the past 3 hours, and just now i managed to pull it .. now its working xD , but still i prefer if we can have a full video details about smtp, using app, for example, the page i was working on have name, email, phone no, message box, and attachment.. when user press send, it will go to the email... the email will have all details along with attachment.. btw it worked while i used portion of your other video titled (Using FilePicker in Xamarin Essentials to Pick PDFs, Images and More!)
Maybe for one of the next Videos: best practice to publish an App. Especially I am looking for ways without using a store. I publish my Apps only locally and right now I just deploy the APK to device manually. There must be better ways...
Ooh that is a nice one! Have you looked into MDM solutions or maybe App Center?
@@jfversluis, MDM solutions is new to be, but looks promising. I checked out App Center already but it did not figure out how to push an update to a Device. I develop apps for mobile Barcode-Scanner (Android) that should not have any access to Google Store, E-Mail, etc. They run in a Kiosk-Mode. I think that this scenario of an only intern use of an app is not very well documented in the web. Be the first ! ;-)
@@LobsterHarry very true. While I do hear a lot of people having these scenarios so that’s cool.
Ah you really want to automatically update? I do know app center has in-app updates and you can make them mandatory, but it will still be the user that has to do it
@@jfversluis, you see that there are a lot of options... Please help us through this jungle ! I can image that those kind of subject does not challenge you very much but I see not other guys who are offering those things. Be unique ! ;-)
what about the reverse? Download a file from blob server to api then from the api to Xamarin?
This is great. Thank you.
You're very welcome!
Awesome! Keep going!))
Thanks! Will do!
Great, thanks. Is it possible to select multiple images and upload through media picker. eagerly waiting for your response.
Picking multiple images at once isn’t supported yet. The MediaPicker only provides the picking, you will have to upload yourself a video on that is here: ua-cam.com/video/KPDGtLeNClQ/v-deo.html
Sir, thanks for a prompt response. I am using xamarin essential file picker to select multiple images and file uploader plugin to upload .can you help me on this how can I send multiple images through this.
@@dreamhunter2895 I think I mention something about multiple files, right? Here are the docs: docs.microsoft.com/xamarin/essentials/file-picker?tabs=ios#pick-multiple-files
And here is a video on how to upload files: ua-cam.com/video/KPDGtLeNClQ/v-deo.html
@@jfversluis Sir, Thanks for your valuable response. Refer My code actually i want to upload multiple images through FileUploder plugin.
private async void ImageButton_Clicked(object sender, EventArgs e)
{
var pickResult = await FilePicker.PickMultipleAsync(new PickOptions
{
FileTypes = FilePickerFileType.Images,
PickerTitle = "Pick image(s)"
});
if (pickResult != null)
{
foreach (var image in pickResult)
{
var stream = await image.OpenReadAsync();
imageList.Add(ImageSource.FromStream(() => stream));
paths.Enqueue(ImageSource.FromStream(() => stream).ToString());
}
collectionView.ItemsSource = imageList;
}
}
private async void Upload_Clicked(object sender, EventArgs e)
{
try
{
if (isBusy)
return;
isBusy = true;
progress.IsVisible = true;
//Uploading multiple images at once
List pathItems = new List();
while (paths.Count > 0)
{
filename = $"{Docketnumber1 + DateTime.Now.ToBinary()}.jpeg";
pathItems.Add(new FileBytesItem("", , filename)); (Here i am not able to add Address of the images which i am getting from filepicker)
}
await CrossFileUploader.Current.UploadFileAsync($"{GlobalVariables.BaseUri}/PostDocument", new FileBytesItem("", fileAsByteArray, filename), new Dictionary()
{
{"docket" ,Docketnumber1 }
/**/
});
Please help me or direct me to correct my code to upload multiple images.
hi... thanks for this learning video... can i ask you something regarding this video ? There's no error but the image was no save on upload folder (iis web server ). Is there any clue / any step that i must do, so image can be save in the server
There has to be some error or message somewhere. Carefully check the logs on both client and server
hey man nice tutorial.
how do you do this with more payload. For example a blog post who has id ,author name, etc etc.
I think your request can consist of multiple types of data. Or else, just make it a second request that might even be simultaneous.
Great tutorial, how can I do for to send additional data to the api?
Typically that is done through a separate request! Think about it… which app lets you set both the profile image and other profile details in one go? They are usually separate:)
How to select and upload multiple images to server.. 🤔🤔 anywhere do not have resources about that..
Find a picker that allows you to pick multiple files and call this in a for loop :D
Great video!
But how can I achieve posting image with some other model ?
What do you mean with some other model?
@@jfversluis for example I want to post a class which has an image as a property
What you see happening a lot is that the data and the image is sent separately, you might want to consider doing that
@@jfversluis yes I know that approach. However I wanted to achieve it in one go
@@teymurasadov295 I’m not even sure that’s possible tbh
Will this method works for multiuploading? E.g i want upload 3 photos, so i must write content.add three times?
No, you’ll have to upload three file separately
@@jfversluis ah, ok, got it, thanks)
Sir , It was working with http but when i change to Https then stop working . Please suggest on this. is it not supported HTTPS ?
HTTPS is definitely supported, should just work :)
Sir, Please help me to pass array of image address into CrossFileUploader.Current.UploadFileAsync with file name
Not sure what you mean by an array of image address. You mean uploading multiple files?
Sir, When i have changed to Https then getting error(Java.IO.IOException: stream was reset: PROTOCOL_ERROR
at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod) etc. Please suggest Sir on this.
No idea, sorry. Should just work :) maybe check it it works from a console application? Or even just from the browser?
Sir, Please make video tutorials on multiple file upload in Xamarin. I am getting the same video every where.
Multiple files is just putting a for loop around this 😄
@@jfversluis Sir, will it work in HTTP 2 ??
I would think so
Hey buddy 😀
Hello friend! Thanks for watching again :D
hi sir can we store files on Azure blob storage?
You absolutely can! I’m guessing you want a video about it ;)
@@jfversluis yes sir if u make a tutorial its really really helpful.😊
I've recorded it! Planning to release it next week. If you want to see it right now consider a membership! ua-cam.com/channels/BBZ2kXWmd8eXlHg2wEaClw.htmljoin
is this method just calling the standard intent?
Sorry, I’m not sure what you mean by this
@@jfversluis If I press a button on my phone, I'm prompted to choose an app that I can use to take a photo
@@maxipunchik ah right. I would expect it to leverage that same mechanism yes. If you have more than one camera app and not specified a default one, you will be asked. If you have a default one, that will be used.
How to barcode scanner in Xamarin Form through web API , I have made web API project which is connect to sql server Database. I try to Scan Barcode result(Data) through Web API to sql server Database.
you are great teacher , I learn a lot of things from you. Give suggestion or share some code , that's great!
I’m sorry, I don’t think I understand what you’re asking… thank you for the kind words!
@@jfversluis I want to Barcode scanner Result(example :Barcode 123456780) go to Sql server DataBase , but Xamarin form can not go to sql server Database , I want use webAPi with Bridge to connect Barcode Scanner Result with webAPI , webAPI can go through SQL serverDataBase,Thanks for your Help
Helpful video but how can we upload multiple files
Add a for loop 😆
@@jfversluis on api side multiple uploads are working but on xamarin side multiple picker is not working
@@Wajih_Ahmed ah that might be. I think that wasn’t available on all platforms when this was first implemented. Also there then a loop where you select multiple files or you’ll have to implement something custom for file picking
Well intended example which did not work for me. Also jumping some bits did not help, hard coded IPs could be OK if the UploadFile context was working properly. Potential issues with the sample source code :/
What doesn’t seem to work for you?
hi, how to send any upload file like doc,pdf,image,video on one click button with attachment to asp.web api
Not sure what you mean. The file type shouldn’t matter :)
@@jfversluis can we send any file type to asp.web api?? but PickPhotoAsync method open only media gallery for images not select pdf file or doc file
That’s true. Use the file picker, the rest should mostly be the same :)
@@jfversluis please send file picker code upload file to asp.web api
Here is a video for the file picker :)
ua-cam.com/video/4gV9ZV61rn4/v-deo.html
can I pass json object with an array of files?
You can, but you can't use that to upload multiple files at once :D
@@jfversluis thanks for reply if you could show me how to add json object wil be great