Support Topics Documentation Slack YouTube Blog

Files directory upload from js sdk issue

hi. I’m using

and I’m using this method to upload png files

Backendless.Files.saveFile( filesFormsDir, document.getElementById(‘idEmail’).innerText+"-"+document.getElementById(‘apartmentNumEmail’).innerText+".png", bytestr, true )
.then( function( savedFileURL ) {
FileSignUrl = Object.values(savedFileURL);
//console.log(FileSignUrl);
htmlView();
})

until today for my 3 month pilot everything was ok
no I’m getting a png file in my files directory but with no content inside.

please , need help

I’m using bytearray to convert the html view to png .
and then just upload it to sever
when converting the html view in my host every thing is ok
only when uploading to server I get a damaged png file

thank a head :slight_smile:
for now its a pilot so everything is on js and not secure later I will create an js api .
maybe its because I’m on free plain for now in Backendless ? maybe there is limit ? to files ?

Hi @tomer_moas

I’m looking into it

Regards, Vlad

I just checked it and seems everything works properly.

Here is my code:

  const base64Image = '/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEhUTEhIVFRUXFhUYGBYXFRUXFRYVFRgWFhUXFRUYHiggGBolGxcYITEhJSkrLi4uFx8zODMsNygtLisBCgoKBQUFDgUFDisZExkrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrK//AABEIAOEA4QMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAADAAIEBQYBBwj/xAA7EAABAwIEBAMHAgYBBAMAAAABAAIRAyEEEjFBBVFhcSKBkQYTMqGxwfBC0QcUI1Lh8WJygpLSFTNT/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/APLQntTQLogCBzUQJrQiAIEE5IBPAQcTglCcGoOLsJ4au5UDF0J+RLKgYAukJ+VLKgHCRCJlSLUAoShELU0tQMIXE+E0hA0lcIVrTptokBzc9Y/oiW0gdM+xqR+nRo6m2i4Zw0vaXVnjmGEtbmGw8QJ12CDClMKs+LYUMdLYLSSBBGsmQ29x/lVpCAZTSnkJpQDK4SnEJpCDkpLqSBA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SUkkkH/2Q=='

  const bytesArray = base64ToBytesArray(base64Image)

  Backendless.Files.saveFile('test', 'test.jpg', bytesArray, true)
    .then(savedFileURL => console.log(savedFileURL))
    .catch(console.error)

  function base64ToBytesArray(base64) {
    const binaryString = window.atob(base64);
    const len = binaryString.length;
    const bytes = new Uint8Array(len);

    for (let i = 0; i < len; i++) {
      bytes[i] = binaryString.charCodeAt(i);
    }

    return bytes.buffer;
  }

how does value bytestr look like? is it a list of bytes?

Yes, there is a size limit according to the doc: https://backendless.com/docs/js/file_save_files_from_byte_arrays.html#errors but I believe this is not the root problem in your case.

Regards, Vlad

I’m checking it and will update you soon
thanksss
how can I make the method a non blocking ?

The example above is using non-blocking approach - saveFile is async function that returns a promise

hi
I changed to your method … and now its works fine
but
can you help me with the email sending
I’m getting as response after sending email as SCHEDULED
why ?

Backendless server handles email sending as an autonomous task. As a result, the final status of the email sent operation is not available right away. To retrieve the status, the client can make a separate API call:

Backendless.Messaging.getMessageStatus(messageId)
 .then(status => {
  })
 .catch(error => {
  })

where messageId is messageId field from response on email sending.
Method returns a JS object with the following structure:

{
  messageId:<messageId>,
  status:<status>,
  errorMessage:<errorMessage>
}

messageId is ID of the email for which the publishing status is retrieved.
The status in the response can be one of the following "published" , "scheduled" , "cancelled" , "failed" or "unknown" .
errorMessage contains a detailed error message when the status property is "failed" .

maybe I didn’t explain my self

my code :

Backendless.Messaging.sendEmail( "Email from online-signs.solutions",
    bodyParts,
    emailsArray,
    attachments)
    .then( function( response ) {
        setTimeout(1000);
        //Alert.render('');
        console.log(response)
        alert(companyFullName+"טופס נשלח בהצלחה , תודה על שיתוף הפעולה.");
        document.getElementById('btnBackEmail').hidden = false;
        //location.reload(true);
    })
    .catch( function( error ) {
        console.log( "error " + error.message );
        alert("הייתה בעיה עם שליחת המייל אנא נסה שוב");
        //location.reload(true);
    })

the respond is SCHEDULED

So, actually your email has been sent, it’s just not an immediate action.

so how can I configure the mail to be send and not scheduled. ?
or its my email service ?

Your email should have been sent already, it’s not about configuration. In response on this action you will always get ‘Scheduled’ status, since emails can’t be sent ‘right now’ (and it’s not about Backendless again - thats just how it works, emails are in the queue, which gets to the task to send email as soon as it copes with the previous ones). Consider it just like a JS promise, that can’t return value immediatly, but you can make sure later that email has been sent using API that I’ve described above.
As for me, I usually don’t even check the status, because if there are no problems on client’s side, then the email will be delivered for sure.
Did you receive your email? Have you set your own smtp settings in Email Settings section?

I didn’t get any mail , and I did configure the smtp and check by testing and got ok green

Have you checked spam folder?
If email still not delivered, let me know your App ID, I will check it tomorrow & let you know here about my results.

ok … thanks a lot for your service:) I will check my spam again and will notice you
I already send an email for my service storage provider of my web site and waiting for answers from him .
thanks again
my app app id is 519D3627-53FA-5FD5-FF77-E3BB5B7F6900

Thanks. I will contact you here tomorrow.

Regards,
Stanislaw

Well, tomorrow is much closer than I thought :slight_smile:
I just notice that you pass “Email from online-signs.solutions” as a template name.
But I don’t see any custom template with such name (no custom templates at all in fact).
The first argument for that function should be the template name. You can create your custom templates in the Messaging -> Emails section.

mixed up a bit

you think its the problem ?
so maybe for now just remove it ?
but till now its worked perfect

No, sorry, I got a little confused. Now it’s clear.

So, I checked with the next code:

const bodyParts = new Backendless.Bodyparts()
bodyParts.textmessage = 'Test email content'

Backendless.Messaging.sendEmail("Email from online-signs.solutions", bodyParts, ['stanislaw.grin@gmail.com'])

And it’s been delivered to me almost immediately. Please check it out.

ok ’ now I saw the problem :
when I’m using the base64ToBytesArray
when sometimes the file that as generate is between 100 to 200 kb
when the file is above 450 ( and I don’t know why) the file is damaged
can you give help why its happening?
I mean why the file getting above 450 kb ? while all the time is 150± ?