LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

URL upload and download

Hello,

I am trying to upload for a specific url an image and i want to get back the data processed , how can this be done ?

i have tried the data socket model its not working.

 

Thanks ,

0 Kudos
Message 1 of 12
(7,564 Views)

You need to provide more information about what you're trying to do.

 

How are you intending to upload/download the data - via HTTP (e.g. GET/POST), FTP or?

 

What are you communicating to - a script on a web server or something else?


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 12
(7,549 Views)

This will download a file.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 12
(7,531 Views)

this is what  i want to communicate with 

 

http://deeplearning.cs.toronto.edu/

 

i want to upload an image and get the classification. i hope this works.

please advise,

 

 

Thank you,

0 Kudos
Message 4 of 12
(7,519 Views)

Do you know how you are able to upload and retrieve images without using the UI? Is there a POST or GET backdoor that allows you to submit the data for processing? Are you working with the CS department they might be able to tell you more about this then we can.

 

Once you are aware of the protocol of how you are actually able to go about uploading and retrieving images then we will be able to help you, but until then we are not really able to help as I doubt anyone here has contacts withing the toronto CS department.

0 Kudos
Message 5 of 12
(7,502 Views)

You will need either:

 

1) Request or ask for an API that allows you submit images via POST and returns the result via HTTP

 

2) Try to 'hack' the webpage to mimic a user submitting the form by doing what the form does to upload the image:

 

Send a multipart POST request to api/upload.php with a file input named 'userfile' and 'upload-classify' and see what gets returned. You may be able to parse the result to get the information you need. 

 

Here's an example of how to POST multipart form data (e.g. an image):

HTTP_Post_Multipart.png

 

As ogk.nz has said, this is a backdoor and may not be permitted by the sites terms and conditions (and often a lot of websites have protection against machines accessing their resources etc.).


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 12
(7,479 Views)

Can you please upload a sample program ?

 

Thanks,

0 Kudos
Message 7 of 12
(7,430 Views)

i have implemented your sample but there is some errors 

can you please help me and fix them ?

 

Thanks , 

 

0 Kudos
Message 8 of 12
(7,369 Views)

Sam's message contains a VI snippet.  You can copy the image file to your harddrive then drag it onto your block diagram.

 

The problem is you didn't code it the way he showed it.  First he used Bundle by Name.  Also, Sam used a typedef constant into both of those Bundle by Names  (you missed the 2nd one.)  Also, his is a typedef that is what function is looking for.  Yours is just some randomly created cluster that doesn't have the same definition of elements that his has.

0 Kudos
Message 9 of 12
(7,361 Views)

thanks for the info. i did what u said and ran the program but there is an error 

"error while reading from the socket"

 

any advice ?

0 Kudos
Message 10 of 12
(7,342 Views)