Alpha Video Training
Results 1 to 3 of 3

Thread: upload file to Amazon S3 from Xbasic

  1. #1
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,436

    Default upload file to Amazon S3 from Xbasic

    Earlier, I was able to upload a file to my S3 bucket from Xbasic. Having switched Zebra Host computers, I cannot get this set up correctly again.
    What I was doing was:

    vc_AWS_CLI_text1 = "aws s3 cp "+ var_file_name_old + " s3://MyS3Bucket/clientName/"
    hwnd3 = sys_shell(vc_AWS_CLI_text1)
    It works from the Windows CMD command when I hardcode the var_file_name_old, but I cannot get it to work using sys_shell(). This is what the interactive window shows:

    sys_shell("aws s3 cp C:\Alpha_Data\Client1\File1.sqlBak s3://MyS3Bucket/clientName/",1)
    ERROR: sys_shell: Cannot find file 'aws s3 cp C:\Alpha_Data\Client1\File1.sqlBak s3://MyS3Bucket/clientName/'
    Is this just a case of CRS (Can't Remember Something) or did something change recently in Alpha?
    Thanks,
    Jay
    Jay Talbott
    Lexington, KY


  2. #2
    "Certified" Alphaholic
    Real Name
    Finian Lennon
    Join Date
    Apr 2000
    Location
    Atlanta, GA
    Posts
    1,798

    Default Re: upload file to Amazon S3 from Xbasic

    Jay:

    Have you tried saving the command line to a .cmd file then running that with sys_shell? That's what I usually do. Something like

    Code:
    vc_AWS_CLI_text1 = "aws s3 cp "+ var_file_name_old + " s3://MyS3Bucket/clientName/"
    fname = "c:\temp\s3copy.cmd"
    save_to_file(vc_AWS_CLI_text1,fname,.F.)
    hwnd3 = sys_shell(fname)
    I'm not sure what difference this would make but it might be worth a try. I'm not aware of any changes to this process, it's been a while since I had to do one like this.
    Finian

  3. #3
    Moderator
    Real Name
    James A. Talbott, Jr.
    Join Date
    Apr 2000
    Location
    Versailles, KY
    Posts
    1,436

    Default Re: upload file to Amazon S3 from Xbasic

    Thanks, Finian. I appreciate it.
    It worked.
    Jay
    Jay Talbott
    Lexington, KY


Similar Threads

  1. S3 File Upload And Xbasic Function
    By swest in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-26-2017, 03:28 PM
  2. Amazon S3 File Upload - need a little JS help
    By PhotoHog in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 12-23-2017, 09:17 AM
  3. Amazon S3 File Upload Error
    By swest in forum Mobile & Browser Applications
    Replies: 2
    Last Post: 09-22-2017, 05:50 PM
  4. Amazon S3 File Upload - After File Select
    By CarlMPearson in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 07-21-2017, 03:25 PM
  5. Upload file to Amazon S3 cloud storage
    By carlbsmith in forum Mobile & Browser Applications
    Replies: 0
    Last Post: 12-23-2015, 09:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •