Forum for discussing general topics related to Couch.
13 posts Page 2 of 2
trendoman wrote: Happy holidays to you too.

I acknowledge, when the process is vague (at least to me), it is difficult to suggest something helpful. You know, you expect some kind of help in this topic - share as many details of the desired process as possible.

It seems to me you'd want to NOT create different files (keep in Cloud only single original uploaded file) and serve original images in the <img src> using the URL params. IS this process correct? Having assumed that, I imagine a 2 step process: (1) simple js-scripted dropzone as a field in Couch which sends images to Cloud with little or no Couch dependence & (2) have a text editable where you manually provide image parameters to be added to the generated source code. Clumsy but I'd like you to explain more about how you see it working.


Thank you for your reply Trendoman :)

I've thought about different approaches, and since I'm not very good at verbalizing myself - I did a mock-up to better explain what I'm after. In an ideal scenario, the would be a dropzone for adding images to the gallery for the cloned page. Once you drop your images, it'll create thumbnails and list them under the dropbox, you can add more or remove images from the queue, once happy - hit upload. The images now gets uploaded to alibaba, couch saves the url ( example http://image-demo.oss-cn-hangzhou.aliyu ... xample.jpg), image order.

One can afterward change cropping (nw, north, ne, west, center, east, sw, south, se), image order or delete.

Please see attached mockups :D

Hope i'm getting more clear! Thanks for taking your time

Step 1.png
Step 1.png (30.02 KiB) Viewed 1272 times


Step 2.png
Step 2.png (34.24 KiB) Viewed 1272 times
Thanks for updating the topic :)
First, I found the API and it allows a lot - https://www.alibabacloud.com/help/doc-detail/44686.htm
Second, I explored what they suggest for PHP and I liked the callback option https://www.alibabacloud.com/help/doc-detail/31923.htm
Next, I found an article on how OSS is implemented in Wordpress https://www.alibabacloud.com/help/doc-detail/32193.htm and seems that WP relies on a generic FTP Uploader plugin called hacklog-remote-attachment.

Now, here is my thought on how achieve the result with less sweat possible. Speaking of Couch, we already have the gallery thing and a gallery can be related to a single page (viewtopic.php?f=8&t=8559 Nested Gallery). Btw, here is a topic about drag-drop sorting of images if you missed it viewtopic.php?f=8&t=12007 So, we already have a gallery thing and each image in the gallery is a cloned page, so it is possible to create a set of editables that allow to configure OSS url params-values for serving that image with url params by Couch in the frontend's output code. Essentially, with a set of checkboxes and dropdowns admin could set rules for that image (styles, channels, resize, convert etc), just like you provided in your url samples.

Uploading to OSS indeed requires a remote uploader plugin, which would add (1) a button "Remote Upload" to the gallery template (top-right corner - Remote Upload | Upload | Manage Folders | View) and (2) a new editable field 'remote_image' for single images (that editable only would upload and store url in Couch DB, allowing to add params manually, essentially being a type-text editable).

All in all, Couch should only store thumbnails of original images, saved from the OSS Cloud. Remotely uploaded images should not be set internally in Couch as 'image' editable, because other tags and routines require physical file present in /couch/uploads to manipulate it. These were my ideas for the moment.
Hi again Trendoman,

Thank you very much for your extensive answer, I didn't expect that - much appreciated! :)

The idea that you lay out sounds like the smartest way of doing it indeed, and I'm happy that I could explain myself a bit better on what I'm trying to achieve! I will go through the links you have posted and have a chat with my dev friend during the holidays, I just saw that you have been involved in developing the image sorting add-on, thanks heaps - that'll be helpful for this project!

Thanks again !

trendoman wrote: Thanks for updating the topic :)
First, I found the API and it allows a lot - https://www.alibabacloud.com/help/doc-detail/44686.htm
Second, I explored what they suggest for PHP and I liked the callback option https://www.alibabacloud.com/help/doc-detail/31923.htm
Next, I found an article on how OSS is implemented in Wordpress https://www.alibabacloud.com/help/doc-detail/32193.htm and seems that WP relies on a generic FTP Uploader plugin called hacklog-remote-attachment.

Now, here is my thought on how achieve the result with less sweat possible. Speaking of Couch, we already have the gallery thing and a gallery can be related to a single page (viewtopic.php?f=8&t=8559 Nested Gallery). Btw, here is a topic about drag-drop sorting of images if you missed it viewtopic.php?f=8&t=12007 So, we already have a gallery thing and each image in the gallery is a cloned page, so it is possible to create a set of editables that allow to configure OSS url params-values for serving that image with url params by Couch in the frontend's output code. Essentially, with a set of checkboxes and dropdowns admin could set rules for that image (styles, channels, resize, convert etc), just like you provided in your url samples.

Uploading to OSS indeed requires a remote uploader plugin, which would add (1) a button "Remote Upload" to the gallery template (top-right corner - Remote Upload | Upload | Manage Folders | View) and (2) a new editable field 'remote_image' for single images (that editable only would upload and store url in Couch DB, allowing to add params manually, essentially being a type-text editable).

All in all, Couch should only store thumbnails of original images, saved from the OSS Cloud. Remotely uploaded images should not be set internally in Couch as 'image' editable, because other tags and routines require physical file present in /couch/uploads to manipulate it. These were my ideas for the moment.
13 posts Page 2 of 2
cron