Jump to content

Search the Community

Showing results for tags 'files'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL






Found 6 results

  1. Hi there! I'm trying to create a submission page in which part of includes the option to submit a file. I am able to use the API to submit normal text info (dates/numbers/prices/etc.), but submitting files is some what of an issue. Currently, this is what I have: The code that retrieves the file and calls the API request leFile = $('#customFile')[0].files[0]; var formData = new FormData(); console.log("form data: " + $.type(formData)) var blob = new File([leFile], leFile.name, {type: leFile.type}) formData.append('file', blob); $(this).caspioPostFile(formData,leFile.name,leFile.type); The API request itself: $.fn.caspioPostFile = function(fData,fName){ //Get access token console.log($.type(fData)); $.post( "https://" + cbIntegrationId + ".caspio.com/oauth/token", { grant_type: "client_credentials", client_id: clientId, client_secret: clientSecret }, function(cbAuth){ //Run POST call $.ajax({ url: "https://" + cbIntegrationId + ".caspio.com/rest/v2/files", type: 'POST', data: fData, processData: false, cache: false, headers: { "Authorization": "Bearer " + cbAuth.access_token, "Content-Type": "application/json", "Accept": "application/json", "Content-Disposition": "attachment; filename="+fName }, dataType: 'json', success: function (data) { console.log("Post Success") console.log(data.Result); }, error: function(data) { console.log("Post Failure") console.log(data.responseJSON); } }); } ); }; Now before I get this as a response, yes I have viewed almost every page on Caspio's site for documentation on rest API v2 and v1, but the problem is that none of it has any concrete examples of code for making this request in v2. The swagger site and its documentation also doesn't help my case for the same reason. I have switched the content-type from application/json to multipart/form-data and back, I have attempted adding Access Control headers, but all of it results in a failed request (returning POST 400, POST 415, or an issue with CORS policy). Does anyone know what I'm doing wrong, or has an example that I could potentially pull from?
  2. I have 887 documents in my Files section. I would like to delete all of them. Is there a way to select and delete all, instead of one by one?
  3. Hello! I'm using Caspio's "File" Data Type? and I'd like to dynamically link to the uploaded files. Is there a way to find a "friendly" link for the files uploaded using the Caspio "File" Data Type? By "friendly" I mean the FileName and/or FilePath is visible? Rather than unfriendly: https://bx.caspio.com/dpImages.aspx?appkey=xxx&fileID=123 Friendly: https://bx.caspio.com/dpImages.aspx?appkey=xxx&filePath=[filePath]/[fileName] Thanks
  4. I have lots of images. They are uploaded and in a folder, but how is Caspio making it easier to maintain the images? It just dumps everything into the same folders without allowing to tag or id the image or file. I have 180 locations. Each location can upload several images and those can change. The Datapage uploads the image and holds it in the current table, but when new images are uploaded, the old sit in the file folder with no identification. If I'm using another Datapage to select available images from, I can either upload or choose from a folder, but everything gets dumped into the list. I only want available photos in my dropdown to be for that specific location. With Caspio getting more money for data charges for images, I would think there would be a great and easy way to manage images and tag them with more fields and then search and select based on those fields and not just the folder it is dumped into. Couldn't find any documentation on this. Ideas or suggestion on what you have done to manage photos...
  5. Hello Caspio Ninjas! I am trying to dynamically include signature images in emails sent from my Caspio App. Jan helped me figure out a friendly url for files hosted in Caspio: [@cbBridgeServer!]/dpImages.aspx?appkey=[@appkey]&file=[@field:FileName] However, this is too long to be emailed using PHP due to a 70 character limit per line. Does anybody have an idea on how to solve this problem? (Other than hosting signature images outside of Caspio) I can't use a URL shortener because then it's no longer dynamic. The [@field:FileName] at the end is very important. Thanks!
  6. Is it possible to automatically assign a specific name to an image/file uploaded through a Datapage?
  • Create New...