Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
test_city  
#1 Posted : Thursday, January 9, 2014 11:36:56 AM(UTC)
test_city

Rank: Newbie

Groups: Member
Joined: 1/9/2014(UTC)
Posts: 2

I know the topics here are for development using Aurigma. My question is coming from the other direction.

I have a project that involves posting data to a public site over which I have no control. They use Aurigma to upload files. I would like to programmatically upload these files without actually having to navigate to the website. In order to do this, I need to know the full http commands being sent to the server. Using common tools, this is very difficult to sniff for uploads done with Aurigma.

I would like to use Curl to emulate these http commands, but I'm simply unable to determine what they are. Am I barking up the wrong tree? Is it simply impossible to do what I'm trying to do?

Your help is appreciated.
Andrew  
#2 Posted : Friday, January 10, 2014 3:06:10 AM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
Well, first of all it is necessary to talk to the developers of that public site. Besides of the file upload itself there may be some additional operations (like authentication, etc).

As for the Aurigma-related part, you should just send POST request to the URL specified by the actionUrl param (you can see it by viewing the source of the page with the uploader). This POST request may contain fields listed here:

https://www.aurigma.com/...t-field-reference-iu.htm

Note, typically only few of these fields are used on the server. It depends on the developers of this site. Also, the uploader settings may change the structure of the POST request (e.g. developers define whether the uploader should send thumbnails, etc).

Hope this gives some food for thought.
test_city  
#3 Posted : Friday, January 10, 2014 8:37:44 AM(UTC)
test_city

Rank: Newbie

Groups: Member
Joined: 1/9/2014(UTC)
Posts: 2

Andrew wrote:
Well, first of all it is necessary to talk to the developers of that public site. Besides of the file upload itself there may be some additional operations (like authentication, etc).

As for the Aurigma-related part, you should just send POST request to the URL specified by the actionUrl param (you can see it by viewing the source of the page with the uploader). This POST request may contain fields listed here:

https://www.aurigma.com/...t-field-reference-iu.htm

Note, typically only few of these fields are used on the server. It depends on the developers of this site. Also, the uploader settings may change the structure of the POST request (e.g. developers define whether the uploader should send thumbnails, etc).

Hope this gives some food for thought.


Thank you for your reply.

Unfortunately this is not the kind of site where I have access to the developers. I have no issues with other areas of the site such as authentication, its just the Aurigma part. If Aurigma is sending a POST request to the server then a network capture tool such as Fiddler, Firebug or Chrome Dev tools should capture it. Yet, it is not.

It would be very useful to see the actual request rather than trying to reverse engineer through the source of the page.

Now that you pointed me in the right direction, I can see in the source the function that constructs the request but there are many fields being used so its rather hard to decipher. One basic question I have is which field denotes the file being uploaded? If my file is located at c:/upload which field in the post request controls that?
Andrew  
#4 Posted : Monday, January 13, 2014 10:44:57 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 876

Thanks: 2 times
Was thanked: 27 time(s) in 27 post(s)
Fiddler should see the POST request by Aurigma fine. We use it to troubleshoot problems:

http://forums.aurigma.co...ader-sends-anything.aspx

The POST request format highly depends on the uploader settings. For example:

Code:
var u = $au.uploader({
    id: 'Uploader1',
    converters: [
        {mode: '*.*=SourceFile'}
    ],
   uploadSettings: { 
      actionUrl: 'upload.aspx', 
      filePerPackage: 1
   }
});


These settings mean that they expect that the uploader will send a single file in a single request. Each file will be sent in File0_0 POST variable, its name will be sent as SourceName_0, its size will be sent as SourceSize_0, etc.

If they set filePerPackage to 0, it will mean that it will send File0_0, File0_1, File0_2, etc in the same request. PackageFileCount variable says how many files are sent in the request.

They may configure it to send thumbnails in addition to the source files:

Code:
var u = $au.uploader({
    converters: [
        {mode: '*.*=SourceFile'},
        {mode: '*.*=Thumbnail', 
        thumbnailWidth: 200, 
        thumbnailHeight: 200, 
        thumbnailFitMode: 'Fit'}
    ],
});


In this case, per each uploaded file a pair of files will be sent: File0_0 will hold the original file, File1_0 will hold the thumbnail, etc.

Things may be even more complicated - if they use chunkSize param. If chunkSize>0, the uploader splits file to chunks of the specified size and upload them in separate requests. It will send a lot of additional fields to identify what a particular piece of a file is sent.

I think it makes sense to download the evaluation package, install sample project, run Fiddler and play with the uploader. You may need to read "Using ActiveX/Java Uploader" section and other documentation articles. This way you will undertstand better how it works.

Makes sense?

Edited by user Monday, January 13, 2014 10:46:18 PM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.