How can I upload an image file into backendless and how the file reference field in the table to be

how can I upload an image file into backendless and how the file reference field in the table to be updated?
for example: I have a table named Items. and in that table there is a field ‘Item_Image’ as file reference. How can I Store the image in the item_image field. I am using .Net. How can I upload and retrieve an image from backendless from .Net Application?

Hi Riyaz

Looks like this is duplicated topic
http://support.backendless.com/t/save-and-retrieve-a-image-file-in-backendless#comment-27735

Follow by this steps:

  1. upload a new image file -> server return fileUrl
  2. update/create a new item in your table “Items” with “Item_Image: fileUrl”
  3. retrieve this “item”
  4. get property “Item_Image” of “item” (this is url to the uploaded file)

So if you have problems with specific step/steps, please let us know and we will try to investigate this specific steps

Regards, Vlad

Hai dear,

Uploading a new image file from my .net application is done. and it is uploaded in the files in backendless server. But how can I get the fileUrl of that image file from server

If you dont mind please show me a example with .Net Code

Ok,

This is example from our docs
https://backendless.com/documentation/files/dotnet/files_file_upload.htm

AsyncCallback<BackendlessAPI.File.BackendlessFile> callback = new AsyncCallback<BackendlessAPI.File.BackendlessFile>( 
 result =>        {          
    //save result.FileURL to where you want
    System.Console.WriteLine( "File uploaded. URL - " + result.FileURL ); 
 }, 
 fault =>        {          
   System.Console.WriteLine( "Error - " + fault ); 
 } );
 
FileStream fs = new FileStream("yourImgName.jpg", FileMode.Open, FileAccess.Read );


BackendlessAPI.Backendless.Files.Upload( fs, "imgDirectoryName", callback );

and as result:

result.FileURL => ‘https://api.backendless.com/4964D91B-B4BC-E583-FFE4-2312312/v1/files/imgDirectoryName/yourImgName.jpg

File upload API and example are available in the documentation:
https://backendless.com/documentation/files/dotnet/files_file_upload.htm

Hello,
I am trying to upload an image to backendless from my android app using Backendless.Files.upload( bitmap, String remotePath,
AsyncCallback responder )
where “bitmap” is my image already displayed in the app.
I’m not sure what the “String remotePath” would be.
Would you give me a hand on this please.
Many thanks.

Hi @Guilherme_Vicente,

The remotePath argument is the path in the Backendless Files storage where the will be stored. You can see the docs for the API here: https://backendless.com/docs/android/files_file_upload.html#java-and-android

Regards,
Mark

Hello Mark,
Thank you so much. It is working well know. Next step, I’ll try the download from myfiles.
Thanks again.