•   about 5 years ago

Direct upload via js

Can I do this? I want to specify the file name directly. Can you give me an example on how to do that, if the below section is wrong?

Thanks so much!

updateDevice();
createKey('C:\data\Product1.txt');

function updateDevice() {
$.ajax({
url: 'https://send-anywhere.com/web/v1/device',
type: 'GET',
dataType: 'jsonp',
data: { api_key: "a31af8328fb9ef4300e496221505ce23b7d04c68", profile_name: "7amfx" },
cache: false
}).done(function (data) {
});
}

function createKey(file) {
$.ajax({
url: 'https://send-anywhere.com/web/v1/key',
type: 'GET',
dataType: 'jsonp',
cache: false
}).done(function (data, textStatus, xhr) {
$('#key').text(data.key);
var formData = new FormData($('#sendForm')[0]);
sendFile(data.weblink, formData);
})
}

  • 7 comments

  • Manager   •   about 5 years ago

    As far as I know, NO. You can't. Local file system can be accessed when you select a file using the input tag.
    If there's any way to access local files directly, please let me know.
    Thank you.

  •   •   about 5 years ago

    I have figured out a way. Thanks.

  •   •   about 5 years ago

    I built a back-end server module in c to handle it. Not sure if I will be able to implement it in time, but it is solved. Thanks!

  • Manager   •   about 5 years ago

    Awesome!
    Do you think you can finish by Aug 21?
    We're considering to extend the submission deadline if it works for you..
    Thanks!

  •   •   about 5 years ago

    No do not extend the deadline. I am finished today. Just producing the demonstration video.

  •   •   about 5 years ago

    I have created a commercial product, and have numerous sample files, and all the demonstrations are ready for the judges. It is intended for broader marketspace.

  • Manager   •   about 5 years ago

    Great! Can't wait to see!
    Thank you, Clyde.

    Best,
    Suhyuk

Comments are closed.