Jump to content
  • 0

Friendly Link For Files


LWSChad

Question

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

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hi @TWIRED,

Thanks for your message. Let's do it out here so everybody can see the Q&A.

Quote

Hey Chad, could surely use your help

 

We are unable to display a stored image file in Caspio bridge.

 

Have tried all sorts of urls but keep getting "File Or Directory Unknown"

 

How does one get the fileid of an image store din caspio

 

WHat is the correct friendly way to display an image or file stored in the bridge.

 

Here is a link which used to work, but no longer works :(

This image exists at the path and the app key is the datapage key which displays the results

https://c2eku***.caspio.com/dpImages.aspx?AppKey=*************&file=/IMAGES_/TRIPATWORK/TESTIMAGES/spiderman.jpg

 

Thanks !

Your path looks good.

Two things to check.

 

If it was working, then stopped... check to make sure the DataPage you're sharing these images from DOES NOT require authentication. (something it may not have required when it worked)

 

I also notice your Account Subdomain [Caspio account settings > c2eku***.caspio.com] in use as the domain.

I use my Caspio Site [Caspio account settings > b5.caspio.com] as the bdomain for this link.

Hope this helps

Link to comment
Share on other sites

  • 0

Thanks for taking the time !

 

Will try the site account settings in the URL format.

finally figured out what the problem is after many hours of messing around .

Heres what I found out

Example
originalimage.jpg (path) is stored in table 1 (file field)
lets say fileID is : 0000

If the filefield  is set to : Upload New File / (Automatically create a unique name) 
And,If a user uploads a file with the SAME NAME ,
originalimage_1.jpg is created 

but the Original Image fileID NOW will change  : 

originalimage.jpg : 0001 << increased by1 and changed
originalimage_2.jpg : 0002

 

This was what was breaking the URL 

https://c2eku181.caspio.com/dpImages.aspx?AppKey=xxxxxxxxxx&file=/IMAGES_/TRIPATWORK/TESTIMAGES/spiderman.jpg

so basically the URL becomes invalid , because it is tied to the fileID of the image.

when the fileid changes, the url cannot find the image because it is still tied to the original file id

 

 

Thanks for the zapier tip, will try it out and seems like a great way to store images with aws..

 

Best !!~

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...