How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

This forum contains topics that were moved from Get Satisfaction
Matthew Huang
Posts: 0
Joined: Mon Jun 09, 2014 11:06 am

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Matthew Huang »

I gave up this approach and instead used the following approach, which works perfectly. Thanks.

https://getsatisfaction.com/apperyio/...

Image

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Joe Sharples »

I have followed this topic to create and implemented it into my app.

JS file:
pre
var file;
function fileSelectHandler(e) {
var files = e.target.files || e.dataTransfer.files;
file = files[0];
previewFile();
}
function previewFile() {
var previewContainer = $('table[dsid=preview]');
var fileName = $('[name=fileName]');
var fileContentType = $('[name=fileContentType]');
// make the preview container visible once a file was selected
previewContainer.toggle();
// set the file name
fileName.text(file.name);
fileContentType.text(file.type);
var reader = new FileReader();
reader.onloadend = function(e) {
var fileDataUrl = e.target.result;

console.log("fileDataUrl: "+fileDataUrl);

localStorage.setItem("fileDataUrl", fileDataUrl);

//Set current avatar to the image component

Code: Select all

     Apperyio("Profile_Pic").attr("src", fileDataUrl); 

 }; 
 //reader.readAsText(file); 
 //reader.readAsBinaryString(file); 
 //reader.readAsArrayBuffer(file); 
 reader.readAsDataURL(file); 

}
/pre

The code in the html component is the same as Yuriis
and the code on the button is the same.

It all works very well.

The only problem is the my fileDataUrl is extremely long.

for example:
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAACBYAAAQ2CAYAAACNlKxbAAAMFWlDQ1BJQ0MgUHJvZmlsZQAASImVlwdUk8kWx+crKYSEFoiAlNCbIL1K7x3pYCMkAUIJIRBU7MiigmtBRQRFRVdAFFwLIIsNu7II9r6gorKyLhZsqLxJAujzvT3vvDlnvu+XO/fe+c9k5jszAMjbsgSCTFQBgCx+njDS34sZn5DIJP0BMKAIZAEJaLDYuQLPiIgQ8I/l3U2AiN/XzMW5/tnvvxZFDjeXDQASATmZk8vOgn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CCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCNQNAQIL6sZ95ioRQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBColgCBBdViYyMEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQTqhgCBBXXjPnOVCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIVEuAwIJqsbERAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACdUOAwIK6cZ+5SgQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBKolQGBBtdjYCAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAgbohQGBB3bjPXCUCCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAAALVEiCwoFpsbIQAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggEDdECCwoG7cZ64SAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQACBagkQWFAtNjZCAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEECgbggQWFA37jNXiQACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAggggAACCCCAQLUECCyoFhsbIYAAAggggAACCCCAAAIIIIAAAggggAACCCCAAAIIIIAAAgggUDcECCyoG/eZq0QAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQKBaAgQWVIuNjRBAAAEEEEAAAQQQQAABBBBAAAEEEEAAAQQQQAABBBBAAAEEEKgbAiF14zK5SgQQQAABBBBAAAEEEEAAAQQQKE8gPTNblq/bInvz8svrxroaEoiOCJf+3dpLakpS0CMs3JItHyxLl217uT9BgQIWJkaHy80D2kn/1sE9A7oziwACCCCAAAIIIIAAAgggUIEAGQsqAGI1AggggAACCCCAAAIIIIAAAnVBYOGqjQQVnMEbnV9YZAM7yjqFfyxII6igLJwgy/fkF9lAjCCrWIQAAggggAACCCCA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C1BJyAgIqette

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Joe Sharples »

I have "fileDataUrl" mapped to a "profillePic" field.

how can I reduce the fileDataUrl length?

I have the profile pic field mapped to an image component in a list item.
the list can have up to 40 database rows mapped to it.
I'm worried that it will slow my app down if the fileDataUrl is so long

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Yurii Orishchuk »

Hi Joe,

fileDataUrl is file binary content converted to base64 view. Thus it's size fully depends on file you choose.

There is not way to limit this length.

Also you can upload this file to Appery.io DB. And then get short URL to that cloud based file.

Regards.

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Joe Sharples »

Is it ok how it is?

or

Do you think it is better to upload the file to Appery.io DB and then map the short URL to the list?

I don't want my it to slow down my app.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Yurii Orishchuk »

Hi Joe,

Yes it's better to upload file to Appery.io Files collection at first. Then get short URL from response of Upload service. And use this short url in your "profillePic" field.

Read more about how to upload files to Appery.io Files collection here: https://devcenter.appery.io/tutorials...

Regards.

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Joe Sharples »

Hi Yurii,

I've been following the tutorial but I don't use the input component to add files.

I use a HTML component:
pre

/pre

button:
pre $('#fileselect').trigger('click');
/pre

js file:
pre
var file;
function fileSelectHandler(e) {
var files = e.target.files || e.dataTransfer.files;
file = files[0];
previewFile();
}
function previewFile() {
var previewContainer = $('table[dsid=preview]');
var fileName = $('[name=fileName]');
var fileContentType = $('[name=fileContentType]');
// make the preview container visible once a file was selected
previewContainer.toggle();
// set the file name
fileName.text(file.name);
fileContentType.text(file.type);
var reader = new FileReader();
reader.onloadend = function(e) {
var fileDataUrl = e.target.result;

console.log("fileDataUrl: "+fileDataUrl);

localStorage.setItem("fileDataUrl", fileDataUrl);

//Set current avatar to the image component

Code: Select all

     Apperyio("Profile_Pic").attr("src", fileDataUrl); 

 }; 
 //reader.readAsText(file); 
 //reader.readAsBinaryString(file); 
 //reader.readAsArrayBuffer(file); 
 reader.readAsDataURL(file); 

}
/pre

therefore the code doesnt work:
preuploadMultipleFilesHelper(uploadService, Apperyio('file_input'));/pre

I tried:
preuploadMultipleFilesHelper(uploadService, Apperyio('Profile_Pic'));/pre

but I get this error.
Image

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Yurii Orishchuk »

Hi Joe,

I guess problem in you custom JS file. Please try to comment this code. (not sure why do you use it).

Please read more about how to upload files to appery.io DB here: https://devcenter.appery.io/tutorials...

Regards.

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Joe Sharples »

The instructions you provide here are different to tutorial here:
https://devcenter.appery.io/tutorials...

If I use the instructions you gave on here I get the file in base64 view saved in local storage "fileDataUrl"

how do I upload the file to appery database from fileDataUrl?

I can't figure it out from that tutorial because that uses a native Appery.io function that helps to upload files codeuploadMultipleFilesHelper(uploadService, Apperyio('file_input'));/code. using two parameters – service name, and the name of the input component.

but your instructions on this post don't use an input component.

So how do I upload the fileDataUrl to appery database?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

How can I have the user upload their own photo and have that photo stored on the database so that each user can have his

Post by Yurii Orishchuk »

Hi Joe,

Here is solution to upload file to Appery.io DB files collection with base64 content.

  1. import DB files upload service.
    Details: http://prntscr.com/5f51tq/direct

  2. add upload service to the page. And call datasource "uploadService2".
    Details: http://prntscr.com/5f52b3/direct

  3. click on "before send" mapping and link your session token to "X-Appery-Session-Token" header.

    Details: http://prntscr.com/5f52oc/direct

  4. Add new JS asset and populate it with following JS code:

    precode

    function b64toBlob(b64Data, contentType, sliceSize) {
    contentType = contentType '';
    sliceSize = sliceSize
    512;

    var byteCharacters = atob(b64Data);
    var byteArrays = [];

    for (var offset = 0; offset < byteCharacters&#46;length; offset += sliceSize) {
    var slice = byteCharacters&#46;slice(offset, offset + sliceSize);

    Code: Select all

     var byteNumbers = new Array(slice&#46;length); 
     for (var i = 0; i < slice&#46;length; i++) { 
         byteNumbers[i] = slice&#46;charCodeAt(i); 
     } 
    
     var byteArray = new Uint8Array(byteNumbers); 
    
     byteArrays&#46;push(byteArray); 

}

Code: Select all

 var blob = new Blob(byteArrays, {type: contentType}); 
 return blob; 

}

/code/pre

Details: http://prntscr.com/5f530x/direct

  1. Add button to the page and add JS "click" event handler with following JS code:

    precode

    &#47;&#47;Here you can set file name&#46;
    var fileName = "myFile&#46;png&quot

    &#47;&#47;Here you can use your base64 content&#46; Note: there is no "data:image/jpeg;base64," part&#46;
    var base64Content = 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4&#47;&#47;8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==';
    var fileBlob = b64toBlob(base64Content, "image/png");

    var data = new FormData();

    data&#46;append(fileName, fileBlob);

    var onSuccess = function(data){
    alert(JSON&#46;stringify(data));
    };

    &#47;&#47;Where "uploadService2" is your updload service datasource name&#46;
    uploadService2&#46;execute({
    'allowDataModification': false,
    'processData': false,
    'body': {data: data},
    'cache': false,
    'success': onSuccess
    });

    /code/pre

    Now on click this button you will upload file and alert with result will appear.
    You can get file url from result and download this file.

    Regards.

Post Reply