NetTalk Central

Author Topic: Need Ideas/Help - Multiple Uploads  (Read 4039 times)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Need Ideas/Help - Multiple Uploads
« on: May 28, 2014, 04:59:46 PM »
Hello All,

Maybe I'm just missing something or making this harder than it needs to be.....

I'm interested in your thoughts, ideas, etc., on how you handle multiple file uploads.  I can successfully upload the files themselves, but, I can only create one record in the table at a time. 

I seem to recall Bruce covering this at one time but, at this point, I'm simply lost.

I can see the SaveFile routine and I know it fires for each file uploaded.  I'm pretty sure each time it fires it's on a different thread (if I remembering Bruce's previous notes on the matter).  But, beyond that, I've hit a brick wall.

Any help is GREATLY appreciated!

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Need Ideas/Help - Multiple Uploads
« Reply #1 on: May 28, 2014, 10:55:58 PM »
Hi Don,

so you have say a "crime scene" and it has a bunch of photos.
So presumably you have a "photos" table in the database, with a link to the scene table.

So on the Scene Form you allow them to upload multiple Photos.
So as each pic comes in, (in SaveFile:: ) you create a record for it in the Photos table, and manually add a record to that table. (linking of course to the session ID of the current Scene).

Cheers
Bruce

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Need Ideas/Help - Multiple Uploads
« Reply #2 on: May 29, 2014, 03:34:19 AM »
Yes sir.  I have tried that.  But when the user presses the save button I always get an "extra" record that I don't need.

I have tried to not allow inserts but that screws me up on the mobile side where I use the old style uploader.

The extra record thing I guess would be my major roadblock.

Thanks,

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Need Ideas/Help - Multiple Uploads
« Reply #3 on: May 30, 2014, 03:41:39 AM »
maybe make a small example Don, and we can go from there.

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Need Ideas/Help - Multiple Uploads
« Reply #4 on: May 30, 2014, 04:44:30 AM »
Will do.  

Just had a nice conversation with Ashley Stahl.  He made a great suggestion for this issue.  I will try his suggestion and report back my findings.

Thanks,

Don
« Last Edit: May 30, 2014, 05:19:04 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Need Ideas/Help - Multiple Uploads
« Reply #5 on: May 31, 2014, 06:27:41 AM »
Solved my issue.  Ashley's suggestion didn't work completely but it did get me pointed in the right direction.

This is what I did:

Used a standard form with file upload
Allow Inserts
Removed standard save button
Inserted "custom" button which is only viewable in mobile mode.
Upload image file and create TPS record in the SaveFile routine of the form

I had to modify the browseimages procedure because it was not refreshing properly when pop-up form used.

Bruce, could you take a look at what I did. 

Example (app, dct, TPS, etc) attached.

Thank y'all!

Don


[attachment deleted by admin]
« Last Edit: May 31, 2014, 08:18:54 AM by DonRidley »
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11